Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 by `double`s.

Constructor Summary
`JSONNumber(double value)` Creates a new JSONNumber from the double value.

Method Summary
`double` | `doubleValue()` Gets the double value this JSONNumber represents.
`boolean` | `equals(java.lang.Object other)`
`double` | `getValue()` Deprecated. use `doubleValue()`
`int` | `hashCode()`
`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, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JSONNumber

    public JSONNumber(double value)

  Creates a new JSONNumber from the double value.

Method Detail

### doubleValue

    public double doubleValue()

  Gets the double value this JSONNumber represents.

### equals

    public boolean equals(java.lang.Object other)

  Overrides:
    `equals` in class `java.lang.Object`

### getValue

    @Deprecated
    public double getValue()

  Deprecated. use `doubleValue()`

  Gets the double value this JSONNumber represents.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### 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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD