public class SimpleNode extends Object implements Node
| Modifier and Type | Field and Description |
|---|---|
protected Node[] |
children |
protected int |
id |
protected Node |
parent |
protected JSONPathCompiler |
parser |
protected Object |
value |
| Constructor and Description |
|---|
SimpleNode(int i) |
SimpleNode(JSONPathCompiler p,
int i) |
| Modifier and Type | Method and Description |
|---|---|
void |
dump(String prefix) |
int |
getId() |
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's
list of children.
|
void |
jjtClose()
This method is called after all the child nodes have been
added.
|
static Node |
jjtCreate(int id) |
static Node |
jjtCreate(JSONPathCompiler p,
int id) |
Node |
jjtGetChild(int i)
This method returns a child node.
|
int |
jjtGetNumChildren()
Return the number of children the node has.
|
Node |
jjtGetParent() |
Object |
jjtGetValue() |
void |
jjtOpen()
This method is called after the node has been made the current
node.
|
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its
parent.
|
void |
jjtSetValue(Object value) |
String |
toString()
Returns a string representation of the object.
|
String |
toString(String prefix) |
protected Node[] children
protected int id
protected Node parent
protected JSONPathCompiler parser
protected Object value
public SimpleNode(int i)
public SimpleNode(JSONPathCompiler p, int i)
public void dump(String prefix)
public void jjtAddChild(Node n, int i)
NodejjtAddChild in interface Nodepublic void jjtClose()
Nodepublic static Node jjtCreate(int id)
public static Node jjtCreate(JSONPathCompiler p, int id)
public Node jjtGetChild(int i)
NodejjtGetChild in interface Nodepublic int jjtGetNumChildren()
NodejjtGetNumChildren in interface Nodepublic Node jjtGetParent()
jjtGetParent in interface Nodepublic Object jjtGetValue()
public void jjtOpen()
Nodepublic void jjtSetParent(Node n)
NodejjtSetParent in interface Nodepublic void jjtSetValue(Object value)
public String toString()
ObjecttoString method returns a
string that "textually represents" this object. The result should be a concise but informative
representation that is easy for a person to read. It is recommended that all subclasses override
this method.
The toString method for class Object returns a string consisting of the name of
the class of which the object is an instance, the at-sign character `@', and the unsigned
hexadecimal representation of the hash code of the object. In other words, this method returns a
string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())