xtc.parser
Class ParseTreeNode

java.lang.Object
  extended by xtc.tree.Node
      extended by xtc.parser.Element
          extended by xtc.parser.ParseTreeNode
All Implemented Interfaces:
java.lang.Iterable<java.lang.Object>, InternalElement, Locatable

public class ParseTreeNode
extends Element
implements InternalElement

Element to create a parse tree node capturing formatting.

Version:
$Revision: 1.4 $
Author:
Robert Grimm
See Also:
Formatting

Nested Class Summary
 
Nested classes/interfaces inherited from class xtc.parser.Element
Element.Tag
 
Field Summary
 Binding node
          The binding capturing the annotated node, which may be null.
 java.util.List<Binding> predecessors
          The bindings capturing the values preceding the annotated node.
 java.util.List<Binding> successors
          The bindings capturing the values succeeding the annotated node.
 
Constructor Summary
ParseTreeNode(java.util.List<Binding> predecessors, Binding node, java.util.List<Binding> successors)
          Create a new parse tree node.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 Element.Tag tag()
          Get this element's tag.
 void write(java.lang.Appendable out)
          Write a human readable representation to the specified appendable.
 
Methods inherited from class xtc.tree.Node
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getLocation, getName, getNode, getProperty, getString, getStringProperty, getTokenText, hasLocation, hasName, hasProperty, hasTraversal, hasVariable, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, properties, remove, removeProperty, set, setLocation, setLocation, setProperty, size, strip, toAnnotation, toList, toString, toToken
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

predecessors

public java.util.List<Binding> predecessors
The bindings capturing the values preceding the annotated node.


node

public Binding node
The binding capturing the annotated node, which may be null.


successors

public java.util.List<Binding> successors
The bindings capturing the values succeeding the annotated node.

Constructor Detail

ParseTreeNode

public ParseTreeNode(java.util.List<Binding> predecessors,
                     Binding node,
                     java.util.List<Binding> successors)
Create a new parse tree node.

Parameters:
predecessors - The predecessors.
node - The node.
successors - The successors.
Method Detail

tag

public Element.Tag tag()
Description copied from class: Element
Get this element's tag.

Specified by:
tag in class Element
Returns:
The tag.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

write

public void write(java.lang.Appendable out)
           throws java.io.IOException
Description copied from class: Node
Write a human readable representation to the specified appendable. If this node supports generic traversal, the default implementation writes this node in algebraic term-format; otherwise, it writes the string returned by Object.toString().

Overrides:
write in class Node
Parameters:
out - The appendable.
Throws:
java.io.IOException - Signals an I/O error.


Copyright © 2012. All Rights Reserved.