com.google.gwt.json.client
Class JSONNumber

java.lang.Object
  extended by com.google.gwt.json.client.JSONValue
      extended by com.google.gwt.json.client.JSONNumber

public class JSONNumber
extends JSONValue

Represents a JSON number. Numbers are represented by doubles.


Constructor Summary
JSONNumber(double value)
          Creates a new JSONNumber from the double value.
 
Method Summary
 double getValue()
          Gets the double value that this JSONNumber represents.
 JSONNumber isNumber()
          Returns this, as this is a JSONNumber.
 java.lang.String toString()
          Returns the JSON representation of this number.
 
Methods inherited from class com.google.gwt.json.client.JSONValue
isArray, isBoolean, isNull, isObject, isString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JSONNumber

public JSONNumber(double value)
Creates a new JSONNumber from the double value.

Method Detail

getValue

public double getValue()
Gets the double value that this JSONNumber represents.


isNumber

public JSONNumber isNumber()
Returns this, as this is a JSONNumber.

Overrides:
isNumber in class JSONValue
Returns:
a reference to a JSONNumber if this JSONValue is a JSONNumber or null otherwise.

toString

public java.lang.String toString()
Returns the JSON representation of this number.

Specified by:
toString in class JSONValue