public final class ListValue extends Object implements DataValue, Iterable<DataValue>
Constructor and Description |
---|
ListValue()
Creates an empty list value.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ValueVisitor visitor) |
void |
add(DataValue value)
Appends the specified element to the end of this list.
|
void |
addAll(Collection<? extends DataValue> c)
Appends all of the values in the specified collection to the end of this
list, in the order that they are returned by the specified collection's
iterator.
|
static ListValue |
booleanList(List<Boolean> boolList) |
ListValue |
copy() |
static ListValue |
doubleList(List<Double> dblList) |
boolean |
equals(Object o) |
DataValue |
get(int index)
Returns the value at the specified position.
|
List<Boolean> |
getBooleanList() |
List<Double> |
getDoubleList() |
List<Long> |
getIntegerList() |
List<DataValue> |
getList()
Returns read-only view of the underlying data.
|
List<char[]> |
getSecretList() |
List<String> |
getStringList() |
DataType |
getType() |
int |
hashCode() |
static ListValue |
integerList(List<Long> intList) |
boolean |
isEmpty()
Returns
true if this list contains no values. |
Iterator<DataValue> |
iterator() |
static ListValue |
optionalBooleanList(List<Boolean> boolList) |
static ListValue |
optionalDoubleList(List<Double> dblList) |
static ListValue |
optionalIntegerList(List<Long> intList) |
static ListValue |
optionalStringList(List<String> strList) |
static ListValue |
secretList(List<char[]> secretList) |
int |
size()
Returns the number of values in this list.
|
static ListValue |
stringList(List<String> strList) |
String |
toString() |
public void add(DataValue value)
value
- data valuepublic void addAll(Collection<? extends DataValue> c)
c
- collection of valuespublic DataValue get(int index)
index
- index of the value to returnpublic boolean isEmpty()
true
if this list contains no values.public int size()
public List<DataValue> getList()
public List<String> getStringList()
CoreException
- if this list contains value which type differs
from StringValue
or OptionalValue
of StringValue
.public List<char[]> getSecretList()
public void accept(ValueVisitor visitor)
public ListValue copy()
copy
in interface DataValue
ConcurrentModificationException
if the DataValue is modified at the time of coping.Copyright © 2016. All Rights Reserved.