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