Class JSONArrayValue
- java.lang.Object
-
- com.dynatrace.openkit.util.json.objects.JSONValue
-
- com.dynatrace.openkit.util.json.objects.JSONArrayValue
-
public class JSONArrayValue extends JSONValue
JSON value class representing an array value.A JSON array is a composite object that stores other
JSON values.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JSONArrayValuefromList(java.util.List<JSONValue> jsonValues)Create a new JSONArrayValue for given List.JSONValueget(int index)Returns the element at the specified position in this JSON array.booleanisArray()Get a boolean indicating whether this instance represents an JSON array value or not.java.util.Iterator<JSONValue>iterator()Returns an iterator over the elements in this JSON array in proper sequence.intsize()Get the size of this JSON array.
-
-
-
Method Detail
-
fromList
public static JSONArrayValue fromList(java.util.List<JSONValue> jsonValues)
Create a new JSONArrayValue for given List.- Parameters:
jsonValues- The list of JSON values.- Returns:
- Newly created
JSONArrayValueornullif argument is null.
-
isArray
public boolean isArray()
Description copied from class:JSONValueGet a boolean indicating whether this instance represents an JSON array value or not.
-
size
public int size()
Get the size of this JSON array.- Returns:
- Size of this JSON array.
-
get
public JSONValue get(int index)
Returns the element at the specified position in this JSON array.- Parameters:
index- Index of the element to return- Returns:
- The element at the specified position in this JSON array.
- Throws:
java.lang.IndexOutOfBoundsException- If givenindexis out of bounds.
-
iterator
public java.util.Iterator<JSONValue> iterator()
Returns an iterator over the elements in this JSON array in proper sequence.- Returns:
- An iterator over the elements in this JSON array in proper sequence
-
-