com.ibm.commons.util.io.json
Class JsonJavaObject

java.lang.Object
  extended by com.ibm.commons.util.io.json.JsonJavaObject
All Implemented Interfaces:
com.ibm.commons.util.io.json.JsonObject

public class JsonJavaObject
extends java.lang.Object
implements com.ibm.commons.util.io.json.JsonObject

Default JSON implementation for a JsonObject.

It can be used instead of Maps as it proposes some very convenient methods for accessing the properties.
This implementation internal uses a Map for storing the properties.


Constructor Summary
JsonJavaObject()
           
 
Method Summary
 java.lang.Object get(java.lang.String property)
           
 boolean getBoolean(java.lang.String property)
           
 double getDouble(java.lang.String property)
           
 int getInt(java.lang.String property)
           
 JsonJavaObject getJsonObject(java.lang.String property)
           
 java.util.Iterator<java.lang.String> getJsonProperties()
           
 java.lang.Object getJsonProperty(java.lang.String property)
           
 long getLong(java.lang.String property)
           
 java.util.Iterator<java.lang.String> getProperties()
           
 java.lang.String getString(java.lang.String property)
           
 boolean isEmpty()
           
 void put(java.lang.String property, java.lang.Object value)
           
 void putBoolean(java.lang.String property, boolean value)
           
 void putDouble(java.lang.String property, double value)
           
 void putInt(java.lang.String property, int value)
           
 void putJsonProperty(java.lang.String property, java.lang.Object value)
           
 void putLong(java.lang.String property, long value)
           
 void putObject(java.lang.String property, java.lang.Object value)
           
 void putString(java.lang.String property, java.lang.Object value)
           
 void putString(java.lang.String property, java.lang.String value)
           
 void remove(java.lang.String property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonJavaObject

public JsonJavaObject()
Method Detail

getJsonProperties

public final java.util.Iterator<java.lang.String> getJsonProperties()
Specified by:
getJsonProperties in interface com.ibm.commons.util.io.json.JsonObject

getJsonProperty

public final java.lang.Object getJsonProperty(java.lang.String property)
Specified by:
getJsonProperty in interface com.ibm.commons.util.io.json.JsonObject

putJsonProperty

public final void putJsonProperty(java.lang.String property,
                                  java.lang.Object value)
Specified by:
putJsonProperty in interface com.ibm.commons.util.io.json.JsonObject

isEmpty

public boolean isEmpty()

getProperties

public java.util.Iterator<java.lang.String> getProperties()

get

public java.lang.Object get(java.lang.String property)

getString

public java.lang.String getString(java.lang.String property)

getInt

public int getInt(java.lang.String property)

getLong

public long getLong(java.lang.String property)

getDouble

public double getDouble(java.lang.String property)

getBoolean

public boolean getBoolean(java.lang.String property)

getJsonObject

public JsonJavaObject getJsonObject(java.lang.String property)

put

public void put(java.lang.String property,
                java.lang.Object value)

remove

public void remove(java.lang.String property)

putString

public void putString(java.lang.String property,
                      java.lang.Object value)

putString

public void putString(java.lang.String property,
                      java.lang.String value)

putInt

public void putInt(java.lang.String property,
                   int value)

putLong

public void putLong(java.lang.String property,
                    long value)

putDouble

public void putDouble(java.lang.String property,
                      double value)

putBoolean

public void putBoolean(java.lang.String property,
                       boolean value)

putObject

public void putObject(java.lang.String property,
                      java.lang.Object value)