public class NodePair extends Node
Modifier and Type | Field and Description |
---|---|
protected NodeString |
mString
The label of the pair.
|
protected NodeValue |
mValue
The value of the pair.
|
Constructor and Description |
---|
NodePair() |
NodePair(java.lang.String string)
Constructor for creating a pair containing a null as value.
|
NodePair(java.lang.String string,
boolean value)
Constructor for creating a pair containing a boolean as value.
|
NodePair(java.lang.String string,
double value)
Constructor for creating a pair containing a number as value.
|
NodePair(java.lang.String string,
JsonObj value)
Constructor for creating a pair containing a NodeObj as value.
|
NodePair(java.lang.String string,
NodeArray value)
Constructor for creating a pair containing a NodeArray as value.
|
NodePair(java.lang.String string,
java.lang.String value)
Constructor for creating a pair containing a string as value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAsString(int columnOffset,
boolean hasLabel)
Delivers recursively a node and all of its children as a formatted string.
|
NodeString |
getString() |
NodeValue |
getValue() |
get, getAsString, getAsStrippedString, getNext, indent
protected NodeString mString
protected NodeValue mValue
public NodePair()
public NodePair(java.lang.String string, java.lang.String value)
string
- The label of the pair.value
- The value of the pair.public NodePair(java.lang.String string, double value)
string
- The label of the pair.value
- The value of the pair.public NodePair(java.lang.String string, boolean value)
string
- The label of the pair.value
- The value of the pair.public NodePair(java.lang.String string)
string
- The label of the pair.public NodePair(java.lang.String string, NodeArray value)
string
- The label of the pair.value
- The value of the pair.public NodePair(java.lang.String string, JsonObj value)
string
- The label of the pair.value
- The value of the pair.public NodeString getString()
public NodeValue getValue()
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.