public final class ListValue extends java.lang.Object implements DataValue, java.lang.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(java.util.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(java.util.List<java.lang.Boolean> boolList) |
ListValue |
copy() |
static ListValue |
doubleList(java.util.List<java.lang.Double> dblList) |
boolean |
equals(java.lang.Object o) |
DataValue |
get(int index)
Returns the value at the specified position.
|
java.util.List<java.lang.Boolean> |
getBooleanList() |
java.util.List<java.lang.Double> |
getDoubleList() |
java.util.List<java.lang.Long> |
getIntegerList() |
java.util.List<DataValue> |
getList()
Returns read-only view of the underlying data.
|
java.util.List<char[]> |
getSecretList() |
java.util.List<java.lang.String> |
getStringList() |
DataType |
getType() |
int |
hashCode() |
static ListValue |
integerList(java.util.List<java.lang.Long> intList) |
boolean |
isEmpty()
Returns
true if this list contains no values. |
java.util.Iterator<DataValue> |
iterator() |
static ListValue |
optionalBooleanList(java.util.List<java.lang.Boolean> boolList) |
static ListValue |
optionalDoubleList(java.util.List<java.lang.Double> dblList) |
static ListValue |
optionalIntegerList(java.util.List<java.lang.Long> intList) |
static ListValue |
optionalStringList(java.util.List<java.lang.String> strList) |
static ListValue |
secretList(java.util.List<char[]> secretList) |
int |
size()
Returns the number of values in this list.
|
static ListValue |
stringList(java.util.List<java.lang.String> strList) |
java.lang.String |
toString() |
public void add(DataValue value)
value
- data valuepublic void addAll(java.util.Collection<? extends DataValue> c)
c
- collection of valuespublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public DataValue get(int index)
index
- index of the value to returnpublic int hashCode()
hashCode
in class java.lang.Object
public boolean isEmpty()
true
if this list contains no values.public java.util.Iterator<DataValue> iterator()
iterator
in interface java.lang.Iterable<DataValue>
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<DataValue> getList()
public java.util.List<java.lang.Long> getIntegerList()
public java.util.List<java.lang.Double> getDoubleList()
public java.util.List<java.lang.Boolean> getBooleanList()
public java.util.List<java.lang.String> getStringList()
CoreException
- if this list contains value which type differs
from StringValue
or OptionalValue
of StringValue
.public java.util.List<char[]> getSecretList()
public static ListValue integerList(java.util.List<java.lang.Long> intList)
public static ListValue doubleList(java.util.List<java.lang.Double> dblList)
public static ListValue booleanList(java.util.List<java.lang.Boolean> boolList)
public static ListValue stringList(java.util.List<java.lang.String> strList)
public static ListValue secretList(java.util.List<char[]> secretList)
public static ListValue optionalIntegerList(java.util.List<java.lang.Long> intList)
public static ListValue optionalDoubleList(java.util.List<java.lang.Double> dblList)
public static ListValue optionalBooleanList(java.util.List<java.lang.Boolean> boolList)
public static ListValue optionalStringList(java.util.List<java.lang.String> strList)
public void accept(ValueVisitor visitor)