1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00
JSON-java/src/test/java/org/json/junit/data/SingletonEnum.java
2017-07-09 18:19:27 -04:00

62 lines
1.2 KiB
Java

package org.json.junit.data;
/**
* Sample singleton done as an Enum for use with bean testing.
*
* @author John Aylward
*
*/
public enum SingletonEnum {
/**
* the singleton instance.
*/
INSTANCE;
/** */
private int someInt;
/** */
private String someString;
/** single instance. */
/**
* @return the singleton instance. I a real application, I'd hope no one did
* this to an enum singleton.
*/
public static final SingletonEnum getInstance() {
return INSTANCE;
}
/** */
private SingletonEnum() {
}
/** @return someInt */
public int getSomeInt() {
return someInt;
}
/**
* sets someInt.
*
* @param someInt
* the someInt to set
*/
public void setSomeInt(int someInt) {
this.someInt = someInt;
}
/** @return someString */
public String getSomeString() {
return someString;
}
/**
* sets someString.
*
* @param someString
* the someString to set
*/
public void setSomeString(String someString) {
this.someString = someString;
}
}