Package com.yahoo.data.access.simple
Class Value.ArrayValue
java.lang.Object
com.yahoo.data.access.simple.Value
com.yahoo.data.access.simple.Value.ArrayValue
- All Implemented Interfaces:
Inspectable
,Inspector
- Enclosing class:
- Value
-
Nested Class Summary
Nested classes/interfaces inherited from class com.yahoo.data.access.simple.Value
Value.ArrayValue, Value.BoolValue, Value.DataValue, Value.DoubleValue, Value.EmptyValue, Value.LongValue, Value.ObjectValue, Value.StringValue
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(double value) add
(int value) add
(long value) entries()
Convert an array to an iterable list.entry
(int idx) Access an array entry.int
Get the number of entries in an ARRAY (always returns 0 for non-arrays)void
Traverse an array value, performing callbacks for each entry.type()
Get the type of an inspectorboolean
valid()
Check if the inspector is valid.
-
Constructor Details
-
ArrayValue
public ArrayValue() -
ArrayValue
public ArrayValue(int capacity)
-
-
Method Details
-
valid
public boolean valid()Description copied from interface:Inspector
Check if the inspector is valid. If you try to access a field or array entry that does not exist, you will get an invalid Inspector returned. -
type
Description copied from interface:Inspector
Get the type of an inspector -
entryCount
public int entryCount()Description copied from interface:Inspector
Get the number of entries in an ARRAY (always returns 0 for non-arrays)- Specified by:
entryCount
in interfaceInspector
- Overrides:
entryCount
in classValue
-
entry
Description copied from interface:Inspector
Access an array entry. If the current Inspector doesn't connect to an array value, or the given array index is out of bounds, the returned Inspector will be invalid. -
traverse
Description copied from interface:Inspector
Traverse an array value, performing callbacks for each entry. If the current Inspector is connected to an array value, perform callbacks to the given traverser for each entry contained in the array. Otherwise a no-op. -
entries
Description copied from interface:Inspector
Convert an array to an iterable list. Other types will just return an empty list. -
add
-
add
-
add
-
add
-
add
-