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