Package org.h2.util.json
Class JSONArray
- java.lang.Object
-
- org.h2.util.json.JSONValue
-
- org.h2.util.json.JSONArray
-
public final class JSONArray extends JSONValue
JSON array.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTo(JSONTarget<?> target)Appends this value to the specified target.JSONValue[]getArray()Returns the value.<E> E[]getArray(java.lang.Class<E> elementType, java.util.function.Function<JSONValue,E> converter)Returns the value.JSONValuegetElement(int index)Returns the value at specified 0-based index, ornull.intlength()Returns the array length
-
-
-
Method Detail
-
addTo
public void addTo(JSONTarget<?> target)
Description copied from class:JSONValueAppends this value to the specified target.
-
length
public int length()
Returns the array length- Returns:
- the array length
-
getArray
public JSONValue[] getArray()
Returns the value.- Returns:
- the value
-
getArray
public <E> E[] getArray(java.lang.Class<E> elementType, java.util.function.Function<JSONValue,E> converter)Returns the value.- Type Parameters:
E- type of elements- Parameters:
elementType- the type of array elementsconverter- a converter to the specified type- Returns:
- the value
-
getElement
public JSONValue getElement(int index)
Returns the value at specified 0-based index, ornull.- Parameters:
index- 0-based index- Returns:
- the value at specified 0-based index, or
null.
-
-