org.directwebremoting.json.types
Class JsonBoolean

java.lang.Object
  extended by org.directwebremoting.json.types.JsonValue
      extended by org.directwebremoting.json.types.JsonBoolean

public class JsonBoolean
extends JsonValue

The Json version of a boolean

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
JsonBoolean(boolean value)
          All JsonBoolean wrap a Java boolean value
JsonBoolean(java.lang.String text)
          All JsonBoolean wrap a Java boolean value
 
Method Summary
 boolean getBoolean()
          Often when dealing with a JsonValue you know which subtype it is, this allows you to assume it is a boolean and get the Java value quickly.
 java.lang.String toExternalRepresentation()
          i.e.
 java.lang.String toString()
           
 
Methods inherited from class org.directwebremoting.json.types.JsonValue
getDouble, getInteger, getJsonArray, getJsonObject, getLong, getString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonBoolean

public JsonBoolean(boolean value)
All JsonBoolean wrap a Java boolean value


JsonBoolean

public JsonBoolean(java.lang.String text)
All JsonBoolean wrap a Java boolean value

Method Detail

getBoolean

public boolean getBoolean()
Description copied from class: JsonValue
Often when dealing with a JsonValue you know which subtype it is, this allows you to assume it is a boolean and get the Java value quickly.

Overrides:
getBoolean in class JsonValue
Returns:
A boolean representing the JsonNumber implementing this

toExternalRepresentation

public java.lang.String toExternalRepresentation()
Description copied from class: JsonValue
i.e. How do we send this from one system to another?

Specified by:
toExternalRepresentation in class JsonValue
Returns:
A string representing the portable version of this data

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Copyright 2008