Package top.focess.util.json
Class AJSONList<E>
- java.lang.Object
-
- top.focess.util.json.JSONObject
-
- top.focess.util.json.AJSONList<E>
-
- Direct Known Subclasses:
JSONDoubleList,JSONIntList,JSONStringList
public abstract class AJSONList<E> extends JSONObject implements IJSONList, Iterable<E>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Eget(int index)Get the value at the given indexJSONListgetJSONList()List<E>getValues()intsize()Get the size of this JSON instance Note: this is for JSONList only.StringtoJson()Translate this JSON instance into json String-
Methods inherited from class top.focess.util.json.JSONObject
contains, get, getJSON, getJSON, getList, getList, parse, parse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Field Detail
-
list
protected final JSONList list
-
-
Constructor Detail
-
AJSONList
public AJSONList(JSONList list)
-
-
Method Detail
-
toJson
public String toJson()
Description copied from class:JSONObjectTranslate this JSON instance into json String- Specified by:
toJsonin classJSONObject- Returns:
- json String translated from this JSON instance
-
getJSONList
public JSONList getJSONList()
- Specified by:
getJSONListin interfaceIJSONList
-
size
public int size()
Description copied from class:JSONObjectGet the size of this JSON instance Note: this is for JSONList only.- Specified by:
sizein interfaceIJSONList- Overrides:
sizein classJSONObject- Returns:
- the size of this JSON instance
-
get
public E get(int index)
Description copied from class:JSONObjectGet the value at the given indexNote: this is for JSONList only.
- Overrides:
getin classJSONObject- Parameters:
index- the index of the value- Returns:
- the value at the given index
-
-