Example usage for Java com.google.gson JsonArray fields, constructors, methods, implement or subclass
The text is from its open source code.
JsonArray() Creates an empty JsonArray. | |
JsonArray(int capacity) |
void | add(Boolean bool) Adds the specified boolean to self. |
void | add(Character character) Adds the specified character to self. |
void | add(Number number) Adds the specified number to self. |
void | add(String string) Adds the specified string to self. |
void | add(JsonElement element) Adds the specified element to self. |
void | addAll(JsonArray array) Adds all the elements of the specified array to self. |
boolean | contains(JsonElement element) Returns true if this array contains the specified element. |
JsonArray | deepCopy() Creates a deep copy of this element and all its children |
boolean | equals(Object o) |
JsonElement | get(int i) Returns the ith element of the array. |
String | getAsString() convenience method to get this array as a String if it contains a single element. |
Iterator | iterator() Returns an iterator to navigate the elements of the array. |
boolean | remove(JsonElement element) Removes the first occurrence of the specified element from this array, if it is present. |
JsonElement | remove(int index) Removes the element at the specified position in this array. |
JsonElement | set(int index, JsonElement element) Replaces the element at the specified position in this array with the specified element. |
int | size() Returns the number of elements in the array. |