public class JsonArrayImpl extends JsonValueImpl implements JsonArray, JsonGroup, JsonMember
| 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.
|
void |
clear()
Clears content of json array.
|
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.
|
JsonGroup |
group() |
boolean |
isEmpty()
Checks if this json array contains no value.
|
JsonValue |
last()
Reads last element of json array.
|
int |
memberIndex(JsonMember m) |
void |
remove()
Removes this instance from parent object.
|
JsonValue |
remove(int index)
Removes n'th element from json array.
|
void |
remove(JsonValue value) |
void |
setGroup(JsonGroup group) |
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, isArray, isBoolLiteral, isExpLiteral, isFracLiteral, isIntLiteral, isLiteral, isNullLiteral, isObject, isStringLiteral, parent, parentIndex, path, 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, isExpLiteral, isFracLiteral, isIntLiteral, isLiteral, isNullLiteral, isObject, isStringLiteral, parent, parentIndex, path, toCompactString, toPrettyStringpublic JsonGroup group()
group in interface JsonMemberpublic void setGroup(JsonGroup group)
setGroup in interface JsonMemberpublic 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)
Copyright © 2018. All rights reserved.