Top Description Fields Constructors Methods
org.jparsec

public final Class ParseTree

extends Object
Class Inheritance
Imports
org.jparsec.internal.util.Strings, java.util.Collections, .List

Represents the syntactical structure of the input being parsed.
Since
2.3

Field Summary

Modifier and TypeField and Description
private final int
private final List<ParseTree>
private final int
private final String
private final Object

Constructor Summary

AccessConstructor and Description
pack-priv
ParseTree(String name, int beginIndex, int endIndex, Object value, List<ParseTree> children)

Method Summary

Modifier and TypeMethod and Description
public int
getBeginIndex()

Returns the index in source where this node starts.

public List<ParseTree>
getChildren()

Returns the immutable list of child nodes that correspond to labeled parsers syntactically enclosed inside parent parser.

public int
getEndIndex()

Returns the index in source where this node ends.

public String
getName()

Returns the node name, which is specified in Parser#label.

public Object
getValue()

Returns the parsed value of this node, or null if it's a failed node.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

beginIndexback to summary
private final int beginIndex
childrenback to summary
private final List<ParseTree> children
endIndexback to summary
private final int endIndex
nameback to summary
private final String name
valueback to summary
private final Object value

Constructor Detail

ParseTreeback to summary
pack-priv ParseTree(String name, int beginIndex, int endIndex, Object value, List<ParseTree> children)

Method Detail

getBeginIndexback to summary
public int getBeginIndex()

Returns the index in source where this node starts.

getChildrenback to summary
public List<ParseTree> getChildren()

Returns the immutable list of child nodes that correspond to labeled parsers syntactically enclosed inside parent parser.

getEndIndexback to summary
public int getEndIndex()

Returns the index in source where this node ends.

getNameback to summary
public String getName()

Returns the node name, which is specified in Parser#label.

getValueback to summary
public Object getValue()

Returns the parsed value of this node, or null if it's a failed node.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override