org.directwebremoting.json
Class JsonBoolean
java.lang.Object
org.directwebremoting.json.JsonValue
org.directwebremoting.json.JsonBoolean
public class JsonBoolean
- extends JsonValue
The Json version of a String
- Author:
- Joe Walker [joe at getahead dot ltd dot uk]
|
Constructor Summary |
JsonBoolean(boolean value)
All JsonStrings wrap a Java string |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JsonBoolean
public JsonBoolean(boolean value)
- All JsonStrings wrap a Java string
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