Package blue.endless.jankson
Class JsonArray
java.lang.Object
blue.endless.jankson.JsonElement
blue.endless.jankson.JsonArray
- All Implemented Interfaces:
Cloneable,Iterable<JsonElement>,Collection<JsonElement>,List<JsonElement>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJsonArray(Collection<?> ts, Marshaller marshaller) JsonArray(T[] ts, Marshaller marshaller) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, JsonElement element) booleanadd(JsonElement e) booleanadd(JsonElement e, String comment) booleanaddAll(int index, Collection<? extends JsonElement> elements) booleanaddAll(Collection<? extends JsonElement> c) voidclear()clone()booleanbooleancontainsAll(Collection<?> c) booleanget(int i) <E> EbooleangetBoolean(int index, boolean defaultValue) bytegetByte(int index, byte defaultValue) chargetChar(int index, char defaultValue) getComment(int i) doublegetDouble(int index, double defaultValue) floatgetFloat(int index, float defaultValue) intgetInt(int index, int defaultValue) longgetLong(int index, long defaultValue) shortgetShort(int index, short defaultValue) inthashCode()intbooleanisEmpty()iterator()intlastIndexOf(Object obj) listIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) set(int index, JsonElement element) voidsetComment(int i, String comment) voidsetMarshaller(Marshaller marshaller) intsize()subList(int arg0, int arg1) toArray()<T> T[]toArray(T[] a) toJson(boolean comments, boolean newlines, int depth) voidtoJson(Writer writer, JsonGrammar grammar, int depth) toString()Methods inherited from class blue.endless.jankson.JsonElement
toJson, toJson, toJson, toJsonMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Field Details
-
marshaller
-
-
Constructor Details
-
JsonArray
public JsonArray() -
JsonArray
-
JsonArray
-
-
Method Details
-
get
- Specified by:
getin interfaceList<JsonElement>
-
getString
-
getBoolean
public boolean getBoolean(int index, boolean defaultValue) -
getByte
public byte getByte(int index, byte defaultValue) -
getChar
public char getChar(int index, char defaultValue) -
getShort
public short getShort(int index, short defaultValue) -
getInt
public int getInt(int index, int defaultValue) -
getLong
public long getLong(int index, long defaultValue) -
getFloat
public float getFloat(int index, float defaultValue) -
getDouble
public double getDouble(int index, double defaultValue) -
getComment
-
setComment
-
toJson
- Specified by:
toJsonin classJsonElement
-
toJson
- Specified by:
toJsonin classJsonElement- Throws:
IOException
-
toString
-
add
-
equals
- Specified by:
equalsin interfaceCollection<JsonElement>- Specified by:
equalsin interfaceList<JsonElement>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<JsonElement>- Specified by:
hashCodein interfaceList<JsonElement>- Overrides:
hashCodein classObject
-
get
-
setMarshaller
-
getMarshaller
-
clone
- Specified by:
clonein classJsonElement
-
size
public int size()- Specified by:
sizein interfaceCollection<JsonElement>- Specified by:
sizein interfaceList<JsonElement>
-
add
- Specified by:
addin interfaceCollection<JsonElement>- Specified by:
addin interfaceList<JsonElement>
-
addAll
- Specified by:
addAllin interfaceCollection<JsonElement>- Specified by:
addAllin interfaceList<JsonElement>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<JsonElement>- Specified by:
clearin interfaceList<JsonElement>
-
contains
- Specified by:
containsin interfaceCollection<JsonElement>- Specified by:
containsin interfaceList<JsonElement>
-
containsAll
- Specified by:
containsAllin interfaceCollection<JsonElement>- Specified by:
containsAllin interfaceList<JsonElement>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<JsonElement>- Specified by:
isEmptyin interfaceList<JsonElement>
-
remove
- Specified by:
removein interfaceCollection<JsonElement>- Specified by:
removein interfaceList<JsonElement>
-
removeAll
- Specified by:
removeAllin interfaceCollection<JsonElement>- Specified by:
removeAllin interfaceList<JsonElement>
-
retainAll
- Specified by:
retainAllin interfaceCollection<JsonElement>- Specified by:
retainAllin interfaceList<JsonElement>
-
toArray
- Specified by:
toArrayin interfaceCollection<JsonElement>- Specified by:
toArrayin interfaceList<JsonElement>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<JsonElement>- Specified by:
toArrayin interfaceList<JsonElement>
-
iterator
- Specified by:
iteratorin interfaceCollection<JsonElement>- Specified by:
iteratorin interfaceIterable<JsonElement>- Specified by:
iteratorin interfaceList<JsonElement>
-
add
- Specified by:
addin interfaceList<JsonElement>
-
addAll
- Specified by:
addAllin interfaceList<JsonElement>
-
indexOf
- Specified by:
indexOfin interfaceList<JsonElement>
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<JsonElement>
-
listIterator
- Specified by:
listIteratorin interfaceList<JsonElement>
-
listIterator
- Specified by:
listIteratorin interfaceList<JsonElement>
-
remove
- Specified by:
removein interfaceList<JsonElement>
-
set
- Specified by:
setin interfaceList<JsonElement>
-
subList
- Specified by:
subListin interfaceList<JsonElement>
-