Package com.google.gwt.json.client
Class JSONNumber
- java.lang.Object
-
- com.google.gwt.json.client.JSONValue
-
- com.google.gwt.json.client.JSONNumber
-
public class JSONNumber extends JSONValue
Represents a JSON number. Numbers are represented bydouble
s.
-
-
Constructor Summary
Constructors Constructor Description JSONNumber(double value)
Creates a new JSONNumber from the double value.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description double
doubleValue()
Gets the double value this JSONNumber represents.boolean
equals(java.lang.Object other)
(package private) JavaScriptObject
getUnwrapper()
Internal.double
getValue()
Deprecated.SeedoubleValue()
int
hashCode()
JSONNumber
isNumber()
Returnsthis
, as this is a JSONNumber.java.lang.String
toString()
Returns the JSON representation of this number.
-
-
-
Method Detail
-
doubleValue
public double doubleValue()
Gets the double value this JSONNumber represents.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
getValue
@Deprecated public double getValue()
Deprecated.SeedoubleValue()
Gets the double value this JSONNumber represents.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isNumber
public JSONNumber isNumber()
Returnsthis
, as this is a JSONNumber.
-
toString
public java.lang.String toString()
Returns the JSON representation of this number.
-
getUnwrapper
JavaScriptObject getUnwrapper()
Description copied from class:JSONValue
Internal. Returns a JS func that can unwrap this value. Used from native code.- Specified by:
getUnwrapper
in classJSONValue
-
-