public class NodeArray extends NodeValue
Modifier and Type | Field and Description |
---|---|
protected NodeElements |
mNodeElements
Holds all elements of the array.
|
Constructor and Description |
---|
NodeArray() |
Modifier and Type | Method and Description |
---|---|
void |
add(NodeValue nv)
Appends the value to the end of the element list.
|
NodeValue |
get(int idx)
If the node is of type NodeObj or NodeArray get() delivers the element with
index idx.
|
java.lang.String |
getAsString(int columnOffset,
boolean hasLabel)
Delivers recursively a node and all of its children as a formatted string.
|
NodeValue |
getNext()
If the node is of type NodeObj or NodeArray getNext() delivers the next
element (of type NodePair or NodeValue).
|
void |
setIdx(int idx)
Sets the index used by the getNext() method.
|
int |
size()
Returns the number of elements in the NodeArray.
|
getAsString, getAsStrippedString, indent
protected NodeElements mNodeElements
public void add(NodeValue nv)
nv
- The value to add.public java.lang.String getAsString(int columnOffset, boolean hasLabel)
Node
getAsString
in class Node
columnOffset
- Number of spaces an element is indented.hasLabel
- If true this node starts in a line with a label. The
element must not be indented then but follows immediately
after the label.public void setIdx(int idx)
idx
- index where the next getNext() call is reading frompublic NodeValue getNext()
Node
public NodeValue get(int idx)
Node
public int size()