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 boolean
booleanValue()
Returnstrue
if this is the instance representing "true",false
otherwise.static JSONBoolean
getInstance(boolean b)
Gets a reference to the singleton instance representing eithertrue
orfalse
.(package private) JavaScriptObject
getUnwrapper()
Internal.JSONBoolean
isBoolean()
Returnsthis
, as this is a JSONBoolean.java.lang.String
toString()
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 eithertrue
orfalse
.- Parameters:
b
- controls which value to get- Returns:
- if
true
, the JSONBoolean instance representingtrue
is returned; otherwise, the JSONBoolean instance representingfalse
is returned
-
booleanValue
public boolean booleanValue()
Returnstrue
if this is the instance representing "true",false
otherwise.
-
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:JSONValue
Internal. Returns a JS func that can unwrap this value. Used from native code.- Specified by:
getUnwrapper
in classJSONValue
-
-