Class NodeFormatter<V>

  • All Implemented Interfaces:
    Formatter<Node<V>>

    public class NodeFormatter<V>
    extends Object
    implements Formatter<Node<V>>
    A simple Formatter that provides String representation for parse tree nodes.
    • Constructor Detail

      • NodeFormatter

        public NodeFormatter​(InputBuffer inputBuffer)
        Creates a new NodeFormatter.
        Parameters:
        inputBuffer - the input buffer underlying the parse tree whose nodes are to be formatted.
    • Method Detail

      • format

        public String format​(Node<V> node)
        Description copied from interface: Formatter
        Create a string representation for the given object.
        Specified by:
        format in interface Formatter<V>
        Parameters:
        node - the object to format
        Returns:
        a string describing the object