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
public static class Value.ArrayValue extends 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 Constructor Description ArrayValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Value.ArrayValue
add(double value)
Value.ArrayValue
add(int value)
Value.ArrayValue
add(long value)
Value.ArrayValue
add(Inspector v)
Value.ArrayValue
add(java.lang.String value)
java.lang.Iterable<Inspector>
entries()
Convert an array to an iterable list.Inspector
entry(int idx)
Access an array entry.int
entryCount()
Get the number of entries in an ARRAY (always returns 0 for non-arrays)void
traverse(ArrayTraverser at)
Traverse an array value, performing callbacks for each entry.Type
type()
Get the type of an inspectorboolean
valid()
Check if the inspector is valid.
-
-
-
Method Detail
-
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.
-
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
public Inspector entry(int idx)
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
public void traverse(ArrayTraverser at)
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
public java.lang.Iterable<Inspector> entries()
Description copied from interface:Inspector
Convert an array to an iterable list. Other types will just return an empty list.
-
add
public Value.ArrayValue add(Inspector v)
-
add
public Value.ArrayValue add(java.lang.String value)
-
add
public Value.ArrayValue add(long value)
-
add
public Value.ArrayValue add(int value)
-
add
public Value.ArrayValue add(double value)
-
-