public class NodeObj extends NodeValue
Modifier and Type | Field and Description |
---|---|
protected NodeMembers |
mNodeMembers |
Constructor and Description |
---|
NodeObj() |
Modifier and Type | Method and Description |
---|---|
void |
add(NodePair np)
Adds a new pair to the end of the member list.
|
NodePair |
get(int idx)
Returns the element with index idx from mNodeMembers.
|
java.lang.String |
getAsString(int columnOffset,
boolean hasLabel)
Delivers recursively a node and all of its children as a formatted string.
|
NodePair |
getNext()
Returns the next NodePair element from mNodeMembers.
|
NodeValue |
getValue(java.lang.String string)
Gets the value of the pair with the string (i. e. the label) given in the
parameter.
|
void |
setIdx(int idx)
Sets the index used by the getNext() method.
|
getAsString, getAsStrippedString, indent
protected NodeMembers mNodeMembers
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 NodePair getNext()
public NodePair get(int idx)
public NodeValue getValue(java.lang.String string)
string
- The label to search.public void add(NodePair np)
np
- the pair to add