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

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

public class ArrayValue
extends JsonValue

Version:
$Id: $
Author:
Andrey Parfonov

Constructor Summary
ArrayValue()
           
 
Method Summary
 void addElement(JsonValue child)
          Add child value.
 java.util.Iterator<JsonValue> getElements()
          Get all element of this value.
 boolean isArray()
          
 int size()
          
 java.lang.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, getElement, getFloatValue, getIntValue, getKeys, getLongValue, getNumberValue, getShortValue, getStringValue, isBoolean, isDouble, isLong, isNull, isNumeric, isObject, isString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayValue

public ArrayValue()
Method Detail

addElement

public void addElement(JsonValue child)
Add child value. This method must be used if isArray() gives true.

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

isArray

public boolean isArray()

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

getElements

public java.util.Iterator<JsonValue> getElements()
Get all element of this value.

Overrides:
getElements in class JsonValue
Returns:
Iterator.

size

public int size()

Overrides:
size in class JsonValue
Returns:
number of child elements.

toString

public java.lang.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 © 2011 eXo Platform SAS. All Rights Reserved.