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 bydoubles.
-
-
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 doubledoubleValue()Gets the double value this JSONNumber represents.booleanequals(java.lang.Object other)(package private) JavaScriptObjectgetUnwrapper()Internal.doublegetValue()Deprecated.SeedoubleValue()inthashCode()JSONNumberisNumber()Returnsthis, as this is a JSONNumber.java.lang.StringtoString()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:
equalsin classjava.lang.Object
-
getValue
@Deprecated public double getValue()
Deprecated.SeedoubleValue()Gets the double value this JSONNumber represents.
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:JSONValueInternal. Returns a JS func that can unwrap this value. Used from native code.- Specified by:
getUnwrapperin classJSONValue
-
-