public class JsonArrayImpl extends JsonValueImpl implements JsonArray, JsonGroup, JsonMember
group| Constructor and Description |
|---|
JsonArrayImpl() |
| Modifier and Type | Method and Description |
|---|---|
JsonArray |
add(JsonValue value)
Adds new element to json array.
|
JsonArray |
add(JsonValue value,
int index)
Adds new element to json array at specified position.
|
Object |
asTemplateParam()
Converts value to value usable for some template frameworks.
|
void |
clear()
Clears content of json array.
|
JsonValue |
copy()
Makes deep copy of this value.
|
void |
findAll(PathMatcher matcher,
List<JsonValue> values,
List<String> path) |
JsonValue |
findFirst(PathMatcher matcher,
List<String> path) |
JsonValue |
first()
Reads first element of json array.
|
JsonValue |
get(int index)
Reads n'th item from json array.
|
boolean |
isEmpty()
Checks if this json array contains no value.
|
JsonValue |
last()
Reads last element of json array.
|
int |
memberIndex(JsonMember m) |
JsonValue |
remove(int index)
Removes n'th element from json array.
|
void |
remove(JsonValue value) |
void |
replaceBy(JsonValue oldValue,
JsonValue newValue) |
int |
size()
Size of json array.
|
void |
toCompactString(StringBuilder sb) |
List<JsonValue> |
toList()
Converts this instance to regulat list of values.
|
void |
toPrettyString(StringBuilder sb,
String prefix,
String indent) |
List<JsonValue> |
values() |
asArray, asBoolLiteral, asExpLiteral, asFracLiteral, asIntLiteral, asLiteral, asNullLiteral, asObject, asStringLiteral, findAll, findAllLiterals, findFirst, findFirstLiteral, group, isArray, isBoolLiteral, isDescendantOf, isExpLiteral, isFracLiteral, isIntLiteral, isLiteral, isNullLiteral, isObject, isStringLiteral, name, parent, parentIndex, path, pathAsString, remove, replaceBy, setGroup, toCompactString, toPrettyStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasArray, asBoolLiteral, asExpLiteral, asFracLiteral, asIntLiteral, asLiteral, asNullLiteral, asObject, asStringLiteral, findAll, findAllLiterals, findFirst, findFirstLiteral, isArray, isBoolLiteral, isDescendantOf, isExpLiteral, isFracLiteral, isIntLiteral, isLiteral, isNullLiteral, isObject, isStringLiteral, name, parent, parentIndex, path, pathAsString, remove, replaceBy, toCompactString, toPrettyStringisDescendantOfgroup, setGrouppublic void toCompactString(StringBuilder sb)
toCompactString in class JsonValueImplpublic void toPrettyString(StringBuilder sb, String prefix, String indent)
toPrettyString in class JsonValueImplpublic boolean isEmpty()
JsonArraypublic int size()
JsonArraypublic void clear()
JsonArraypublic JsonValue get(int index)
JsonArraypublic JsonValue remove(int index)
JsonArraypublic JsonValue first()
JsonArraypublic JsonValue last()
JsonArraypublic JsonArray add(JsonValue value)
JsonArraypublic JsonArray add(JsonValue value, int index)
JsonArraypublic List<JsonValue> toList()
JsonArraypublic int memberIndex(JsonMember m)
memberIndex in interface JsonGrouppublic JsonValue findFirst(PathMatcher matcher, List<String> path)
findFirst in class JsonValueImplpublic void findAll(PathMatcher matcher, List<JsonValue> values, List<String> path)
findAll in class JsonValueImplpublic void remove(JsonValue value)
public JsonValue copy()
JsonValuepublic Object asTemplateParam()
JsonValueasTemplateParam in interface JsonValueCopyright © 2020. All rights reserved.