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
Constructors -
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.intGet the number of entries in an ARRAY (always returns 0 for non-arrays)voidTraverse an array value, performing callbacks for each entry.type()Get the type of an inspectorbooleanvalid()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:InspectorCheck 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:InspectorGet the type of an inspector -
entryCount
public int entryCount()Description copied from interface:InspectorGet the number of entries in an ARRAY (always returns 0 for non-arrays)- Specified by:
entryCountin interfaceInspector- Overrides:
entryCountin classValue
-
entry
Description copied from interface:InspectorAccess 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:InspectorTraverse 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:InspectorConvert an array to an iterable list. Other types will just return an empty list. -
add
-
add
-
add
-
add
-
add
-