Package 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbooleanValue()Returnstrueif this is the instance representing "true",falseotherwise.static JSONBooleangetInstance(boolean b)Gets a reference to the singleton instance representing eithertrueorfalse.(package private) JavaScriptObjectgetUnwrapper()Internal.JSONBooleanisBoolean()Returnsthis, as this is a JSONBoolean.java.lang.StringtoString()Returns "true" for the true value, and "false" for the false value.
-
-
-
Method Detail
-
getInstance
public static JSONBoolean getInstance(boolean b)
Gets a reference to the singleton instance representing eithertrueorfalse.- Parameters:
b- controls which value to get- Returns:
- if
true, the JSONBoolean instance representingtrueis returned; otherwise, the JSONBoolean instance representingfalseis returned
-
booleanValue
public boolean booleanValue()
Returnstrueif this is the instance representing "true",falseotherwise.
-
isBoolean
public JSONBoolean isBoolean()
Returnsthis, as this is a JSONBoolean.
-
toString
public java.lang.String toString()
Returns "true" for the true value, and "false" for the false value.
-
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
-
-