|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.foundation.json.OptBoolean
public class OptBoolean
An optional JSON message parameter of type boolean.
| Field Summary | |
|---|---|
static OptBoolean |
theMissingValue
Singleton instance of OptBoolean with the value not present. |
| Constructor Summary | |
|---|---|
OptBoolean(boolean value)
Constructor (value present). |
|
| Method Summary | |
|---|---|
boolean |
present()
Test if this parameter's value was present. |
boolean |
value()
Get the boolean value of the parameter. |
boolean |
value(boolean defaultValue)
Get the boolean value of this parameter, or a default value if the value is absent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final OptBoolean theMissingValue
| Constructor Detail |
|---|
public OptBoolean(boolean value)
value - The value of the parameter| Method Detail |
|---|
public boolean value()
Error - if the value is not present.public boolean value(boolean defaultValue)
defaultValue - The default value for the parameter.
public boolean present()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||