Constructor and Description |
---|
JSONArray()
Creates a new empty JSONArray.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(JSONVisitor v) |
void |
addValue(J value)
Adds a new value to the array.
|
J |
find(Predicate<J> pred)
Finds and returns the first JSON element in the array which satisfies the
given predicate.
|
JSON |
getValue(int index)
Returns an element at a given index.
|
java.util.Iterator<J> |
iterator() |
void |
removeValue(int index)
Removes an element at a given index.
|
void |
removeValue(J value)
Removes a specified value from the array (by reference).
|
int |
size()
Returns the number of elements in the array.
|
public void addValue(J value)
value
- public void removeValue(J value)
value
- public void removeValue(int index)
index
- public JSON getValue(int index)
index
- public int size()
public J find(Predicate<J> pred)
pred
- public java.util.Iterator<J> iterator()
public void accept(JSONVisitor v)