|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.json.types.JsonValue
org.directwebremoting.json.types.JsonNumber
public class JsonNumber
The Json version of a Number
| Constructor Summary | |
|---|---|
JsonNumber(double value)
All JsonNumbers wrap something stored as a double |
|
JsonNumber(int value)
All JsonNumbers wrap something stored as a double |
|
JsonNumber(long value)
All JsonNumbers wrap something stored as a double |
|
JsonNumber(java.lang.String text)
Parse the input string as a double |
|
| Method Summary | |
|---|---|
double |
getDouble()
Often when dealing with a JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly. |
int |
getInteger()
Often when dealing with a JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly. |
long |
getLong()
Often when dealing with a JsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly. |
java.lang.String |
toExternalRepresentation()
i.e. |
java.lang.String |
toString()
|
| Methods inherited from class org.directwebremoting.json.types.JsonValue |
|---|
getBoolean, getJsonArray, getJsonObject, getString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JsonNumber(int value)
public JsonNumber(long value)
public JsonNumber(double value)
public JsonNumber(java.lang.String text)
| Method Detail |
|---|
public double getDouble()
JsonValueJsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
getDouble in class JsonValueJsonNumber implementing thispublic long getLong()
JsonValueJsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
getLong in class JsonValueJsonNumber implementing thispublic int getInteger()
JsonValueJsonValue you know which subtype it is,
this allows you to assume it is a number and get the Java value quickly.
getInteger in class JsonValueJsonNumber implementing thispublic java.lang.String toExternalRepresentation()
JsonValue
toExternalRepresentation in class JsonValuepublic java.lang.String toString()
toString in class java.lang.Object
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||