Package com.github.wnameless.json.base
Interface JsonArrayBase<JVB extends JsonValueBase<JVB>>
-
- Type Parameters:
JVB- the type of a JSON implementation wrapper
- All Superinterfaces:
Iterable<JVB>,Jsonable,JsonValueBase<JVB>
- All Known Subinterfaces:
JsonArrayCore<JVC>
- All Known Implementing Classes:
GsonJsonArray,JacksonJsonArray
public interface JsonArrayBase<JVB extends JsonValueBase<JVB>> extends Iterable<JVB>, JsonValueBase<JVB>
JsonArrayBaseextendsJsonValueBaseand adds essential methods which should be included in any JSON array implementation.- Author:
- Wei-Ming Wu
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description JVBget(int index)Returns a JSON value wrapper by given index.default booleanisEmpty()Checks if this JSON array is empty.intsize()Returns the size of this JSON array.default List<Object>toList()Converts this JSON array to a JavaList.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
get
JVB get(int index)
Returns a JSON value wrapper by given index.- Parameters:
index- a position in this JSON array- Returns:
- a JSON value wrapper
-
size
int size()
Returns the size of this JSON array.- Returns:
- an int
-
isEmpty
default boolean isEmpty()
Checks if this JSON array is empty.- Returns:
- true if this JSON array is empty, false otherwise
-
-