public class JsonArray extends JsonElement implements java.util.Collection<JsonElement>, java.lang.Iterable<JsonElement>
| Modifier and Type | Field and Description |
|---|---|
protected Marshaller |
marshaller |
| Constructor and Description |
|---|
JsonArray() |
JsonArray(java.util.Collection<?> ts,
Marshaller marshaller) |
JsonArray(T[] ts,
Marshaller marshaller) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(JsonElement e) |
boolean |
add(JsonElement e,
java.lang.String comment) |
boolean |
addAll(java.util.Collection<? extends JsonElement> c) |
void |
clear() |
JsonArray |
clone() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object other) |
<E> E |
get(java.lang.Class<E> clazz,
int index) |
JsonElement |
get(int i) |
java.lang.String |
getComment(int i) |
Marshaller |
getMarshaller() |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<JsonElement> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
void |
setComment(int i,
java.lang.String comment) |
void |
setMarshaller(Marshaller marshaller) |
int |
size() |
JsonElement[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toJson(boolean comments,
boolean newlines,
int depth) |
java.lang.String |
toJson(JsonGrammar grammar,
int depth) |
java.lang.String |
toString() |
toJson, toJson, toJsonprotected Marshaller marshaller
public JsonArray()
public JsonArray(T[] ts,
Marshaller marshaller)
public JsonArray(java.util.Collection<?> ts,
Marshaller marshaller)
public JsonElement get(int i)
public java.lang.String getComment(int i)
public void setComment(int i,
java.lang.String comment)
public java.lang.String toJson(boolean comments,
boolean newlines,
int depth)
toJson in class JsonElementpublic java.lang.String toJson(JsonGrammar grammar, int depth)
toJson in class JsonElementpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean add(@Nonnull
JsonElement e,
java.lang.String comment)
public boolean equals(java.lang.Object other)
equals in interface java.util.Collection<JsonElement>equals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Collection<JsonElement>hashCode in class java.lang.Object@Nullable
public <E> E get(@Nonnull
java.lang.Class<E> clazz,
int index)
public void setMarshaller(Marshaller marshaller)
public Marshaller getMarshaller()
public JsonArray clone()
clone in class JsonElementpublic int size()
size in interface java.util.Collection<JsonElement>public boolean add(@Nonnull
JsonElement e)
add in interface java.util.Collection<JsonElement>public boolean addAll(java.util.Collection<? extends JsonElement> c)
addAll in interface java.util.Collection<JsonElement>public void clear()
clear in interface java.util.Collection<JsonElement>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<JsonElement>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<JsonElement>public boolean isEmpty()
isEmpty in interface java.util.Collection<JsonElement>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<JsonElement>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<JsonElement>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<JsonElement>public JsonElement[] toArray()
toArray in interface java.util.Collection<JsonElement>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<JsonElement>public java.util.Iterator<JsonElement> iterator()
iterator in interface java.lang.Iterable<JsonElement>iterator in interface java.util.Collection<JsonElement>