playn.flash.json.impl
Class JreJsonArray

java.lang.Object
  extended by playn.flash.json.impl.JreJsonValue
      extended by playn.flash.json.impl.JreJsonArray
All Implemented Interfaces:
JsonArray, JsonValue

public class JreJsonArray
extends JreJsonValue
implements JsonArray

Server-side implementation of JsonArray.


Constructor Summary
JreJsonArray(JsonFactory factory)
           
 
Method Summary
<T extends JsonValue>
T
get(int index)
           
 Object getObject()
           
 JsonType getType()
          Returns an enumeration representing the fundamental JSON type.
 boolean jsEquals(JsonValue value)
          Equivalent of Javascript '==' operator comparison between two values.
 int length()
           
 void remove(int index)
           
 void set(int index, boolean bool)
           
 void set(int index, double number)
           
 void set(int index, JsonValue value)
           
 void set(int index, String string)
           
 String toJson()
          Returns a serialized JSON string representing this value.
 void traverse(playn.flash.json.impl.JsonVisitor visitor, playn.flash.json.impl.JsonContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JreJsonArray

public JreJsonArray(JsonFactory factory)
Method Detail

get

public <T extends JsonValue> T get(int index)
Specified by:
get in interface JsonArray

getObject

public Object getObject()
Specified by:
getObject in class JreJsonValue

getType

public JsonType getType()
Description copied from interface: JsonValue
Returns an enumeration representing the fundamental JSON type.

Specified by:
getType in interface JsonValue

length

public int length()
Specified by:
length in interface JsonArray

remove

public void remove(int index)
Specified by:
remove in interface JsonArray

set

public void set(int index,
                JsonValue value)
Specified by:
set in interface JsonArray

set

public void set(int index,
                String string)
Specified by:
set in interface JsonArray

set

public void set(int index,
                double number)
Specified by:
set in interface JsonArray

set

public void set(int index,
                boolean bool)
Specified by:
set in interface JsonArray

jsEquals

public boolean jsEquals(JsonValue value)
Description copied from interface: JsonValue
Equivalent of Javascript '==' operator comparison between two values.

Specified by:
jsEquals in interface JsonValue

traverse

public void traverse(playn.flash.json.impl.JsonVisitor visitor,
                     playn.flash.json.impl.JsonContext ctx)
Specified by:
traverse in class JreJsonValue

toJson

public String toJson()
Description copied from interface: JsonValue
Returns a serialized JSON string representing this value.

Specified by:
toJson in interface JsonValue
Returns:


Copyright © 2011. All Rights Reserved.