|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.foundation.json.OptInteger
public class OptInteger
An optional JSON message parameter of type int.
| Field Summary | |
|---|---|
static OptInteger |
theMissingValue
Singleton instance of OptInteger with the value not present. |
| Constructor Summary | |
|---|---|
OptInteger(int value)
Constructor (value present). |
|
| Method Summary | |
|---|---|
boolean |
present()
Test if this parameter's value was present. |
int |
value()
Get the int value of the parameter. |
int |
value(int defaultValue)
Get the int 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 OptInteger theMissingValue
| Constructor Detail |
|---|
public OptInteger(int value)
value - The value of the parameter.| Method Detail |
|---|
public int value()
Error - if the value is not present.public int value(int 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 | ||||||||