Serializable, Iterable<PropertyValue>public final class ListValue extends PropertyValue
PropertyValue.ValueType| Modifier and Type | Method | Description |
|---|---|---|
ListValue |
addList() |
Adds an anonymous array.
|
ObjectValue |
addObject() |
Adds an anonymous child createObject to the array.
|
ListValue |
addPropertyValue(PropertyValue value) |
Adds a createValue to the array.
|
ListValue |
addValue(String value) |
Adds an anonymous text value to the array.
|
ListValue |
addValues(String... values) |
Adds text values to the array.
|
protected ListValue |
deepClone() |
Creates a deep clone of this intance.
|
boolean |
equals(Object o) |
|
static ListValue |
from(Collection<PropertyValue> values) |
Merges multiple values into one single node.
|
int |
getIndex(PropertyValue member) |
Get the index of the given member value.
|
List<ListValue> |
getLists() |
Get all array elements of type
ListValue. |
List<ListValue> |
getLists(String name) |
Get the array elements, filtered by the given name.
|
List<ObjectValue> |
getObjects(String name) |
Get the array elements, filtered by the given predicate.
|
PropertyValue |
getPropertyValue(int n) |
Get the n-th element of the children.
|
List<PropertyValue> |
getPropertyValues(String name) |
Get the text elements, filtered by the given name.
|
int |
getSize() |
Get the createValue's number of elements.
|
String |
getValue() |
Get the node's createValue.
|
String |
getValue(int index) |
Get a String value with the given key, if possible.
|
PropertyValue.ValueType |
getValueType() |
Get the item's current createValue type.
|
int |
hashCode() |
|
Iterator<PropertyValue> |
iterator() |
|
ListValue |
mutable() |
Clones this instance and all it's children, marking as mutable value.
|
PropertyValue |
setValue(String value) |
Sets the createValue.
|
ListValue |
toListValue() |
Convert an instance to a List PropertyValue.
|
ObjectValue |
toObjectValue() |
Convert an instance to a Object PropertyValue.
|
String |
toString() |
Create a String representation of the tree.
|
forEach, spliteratorclone, finalize, getClass, notify, notifyAll, wait, wait, waitcheckImmutable, createList, createList, createObject, createObject, createValue, getKey, getMeta, getMeta, getMetaEntry, getParent, getQualifiedKey, getSource, getVersion, immutable, incrementVersion, isImmutable, isLeaf, isRoot, mapProperties, mapProperties, mapProperties, removeMeta, setKey, setMeta, setMeta, setParent, setVersion, toLocalMap, toMappublic PropertyValue.ValueType getValueType()
getValueType in class PropertyValuepublic int getIndex(PropertyValue member)
member - the member, not null.public int getSize()
getSize in class PropertyValuepublic Iterator<PropertyValue> iterator()
iterator in interface Iterable<PropertyValue>iterator in class PropertyValuepublic ListValue addPropertyValue(PropertyValue value)
value - the createValue, not nullIllegalStateException - if the instance is immutable.PropertyValue.isImmutable()public ListValue addValue(String value)
value - the child's value, not null.IllegalStateException - if the instance is immutable.PropertyValue.isImmutable()public ListValue addValues(String... values)
values - the child's values, not null.IllegalStateException - if the instance is immutable.PropertyValue.isImmutable()public ObjectValue addObject()
IllegalStateException - if the instance is immutable.PropertyValue.isImmutable()public ListValue addList()
IllegalStateException - if the instance is immutable.PropertyValue.isImmutable()public String getValue(int index)
toString() method is used as a result.index - the target index.public PropertyValue getPropertyValue(int n)
n - the index.NoSuchElementException - if no such element exists.public List<ObjectValue> getObjects(String name)
name - the name of the objects, null selects all.public List<ListValue> getLists(String name)
name - the name of the objects, null selects all.public List<ListValue> getLists()
ListValue.public List<PropertyValue> getPropertyValues(String name)
name - the name of the objects, null selects all.public ObjectValue toObjectValue()
PropertyValuetoObjectValue in class PropertyValuepublic ListValue toListValue()
PropertyValuetoListValue in class PropertyValuepublic String getValue()
getValue in class PropertyValuepublic PropertyValue setValue(String value)
PropertyValuesetValue in class PropertyValuevalue - the createValuePropertyValue.isImmutable()public ListValue mutable()
mutable in class PropertyValueprotected ListValue deepClone()
PropertyValuedeepClone in class PropertyValuepublic boolean equals(Object o)
equals in class PropertyValuepublic int hashCode()
hashCode in class PropertyValuepublic String toString()
PropertyValuetoString in class PropertyValuepublic static ListValue from(Collection<PropertyValue> values)
values - the values to merge, not null.Copyright © 2014–2019 Apache Software Foundation. All rights reserved.