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 Details

    • 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 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