JSONBoolean (GWT Javadoc)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.json.client
Class JSONBoolean

    java.lang.Object
      com.google.gwt.json.client.JSONValue
          com.google.gwt.json.client.JSONBoolean

    public class JSONBoolean

extends JSONValue

Represents a JSON boolean value.

Method Summary
`boolean` | `booleanValue()` Returns `true` if this is the instance representing "true", `false` otherwise.
`static JSONBoolean` | `getInstance(boolean b)` Gets a reference to the singleton instance representing either `true` or `false`.
`(package private) JavaScriptObject` | `getUnwrapper()` Internal.
`JSONBoolean` | `isBoolean()` Returns `this`, as this is a JSONBoolean.
`java.lang.String` | `toString()` Returns "true" for the true value, and "false" for the false value.

Methods inherited from class com.google.gwt.json.client.JSONValue
`isArray, isNull, isNumber, isObject, isString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getInstance

    public static JSONBoolean getInstance(boolean b)

  Gets a reference to the singleton instance representing either `true` or `false`.

  Parameters:
    `b` - controls which value to get
  Returns:
    if `true`, the JSONBoolean instance representing `true` is returned; otherwise, the JSONBoolean instance representing `false` is returned

### booleanValue

    public boolean booleanValue()

  Returns `true` if this is the instance representing "true", `false` otherwise.

### isBoolean

    public JSONBoolean isBoolean()

  Returns `this`, as this is a JSONBoolean.

  Overrides:
    `isBoolean` in class `JSONValue`
  Returns:
    a reference to a JSONBoolean if this JSONValue is a JSONBoolean or `null` otherwise.

### toString

    public java.lang.String toString()

  Returns "true" for the true value, and "false" for the false value.

  Specified by:
    `toString` in class `JSONValue`

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

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD