org.exoplatform.ws.frameworks.json.value.impl
Class ObjectValue

java.lang.Object
  extended by org.exoplatform.ws.frameworks.json.value.JsonValue
      extended by org.exoplatform.ws.frameworks.json.value.impl.ObjectValue

public class ObjectValue
extends JsonValue

Version:
$Id: $
Author:
Andrey Parfonov

Constructor Summary
ObjectValue()
           
 
Method Summary
 void addElement(String key, JsonValue child)
          Add child value.
 JsonValue getElement(String key)
          Get value by key.
 Iterator<String> getKeys()
          Get all keys for access values.
 boolean isObject()
          
 String toString()
          
 void writeTo(JsonWriter writer)
          Write value in given writer.
 
Methods inherited from class org.exoplatform.ws.frameworks.json.value.JsonValue
addElement, getBooleanValue, getByteValue, getDoubleValue, getElements, getFloatValue, getIntValue, getLongValue, getNumberValue, getShortValue, getStringValue, isArray, isBoolean, isDouble, isLong, isNull, isNumeric, isString, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectValue

public ObjectValue()
Method Detail

addElement

public void addElement(String key,
                       JsonValue child)
Add child value. This method must be used if isObject() gives true.

Overrides:
addElement in class JsonValue
Parameters:
key - the key.
child - the child value.

isObject

public boolean isObject()

Overrides:
isObject in class JsonValue
Returns:
true if value is 'object', false otherwise. Should be overridden.

getKeys

public Iterator<String> getKeys()
Get all keys for access values.

Overrides:
getKeys in class JsonValue
Returns:
Iterator.

getElement

public JsonValue getElement(String key)
Get value by key.

Overrides:
getElement in class JsonValue
Parameters:
key - the key.
Returns:
JsonVAlue with specified key.

toString

public String toString()

Specified by:
toString in class JsonValue

writeTo

public void writeTo(JsonWriter writer)
             throws JsonException
Write value in given writer.

Specified by:
writeTo in class JsonValue
Parameters:
writer - Writer.
Throws:
JsonException - if any errors occurs.


Copyright © 2009 eXo Platform SAS. All Rights Reserved.