net.sf.arise.piji
Class AbstractNode

java.lang.Object
  |
  +--net.sf.arise.piji.AbstractNode
All Implemented Interfaces:
Expression, java.io.Serializable
Direct Known Subclasses:
LeafNode, ListNode

public abstract class AbstractNode
extends java.lang.Object
implements Expression

An implementation of the Expression interface, using a tree structure, hence the name. This abstract superclass spans leaf and tree node subclasses

Author:
Kjetil Valstadsve.
See Also:
Serialized Form

Constructor Summary
AbstractNode()
           
 
Method Summary
 java.lang.String toSchemeString()
          Gets a scheme string representation of this node.
 java.lang.String toString()
           
protected abstract  void writeToBuffer(java.lang.StringBuffer buffer, int xcoord, boolean indent)
          Used to get a scheme string representation of this node with proper indentation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.arise.piji.Expression
evaluate
 

Constructor Detail

AbstractNode

public AbstractNode()
Method Detail

writeToBuffer

protected abstract void writeToBuffer(java.lang.StringBuffer buffer,
                                      int xcoord,
                                      boolean indent)
Used to get a scheme string representation of this node with proper indentation.

Parameters:
xcoord - Used to set the indentation for printing, enabling proper tree structuring of the output
Returns:
A string describing the tree

toSchemeString

public final java.lang.String toSchemeString()
Gets a scheme string representation of this node. Simply calls asSchemeString with a zero offset, should not be redefined by subclasses.

Specified by:
toSchemeString in interface Expression
Returns:
This expression in a string form

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object


All code and documentation is

Copyright (c) : 2000-2003 Kjetil Valstadsve & Maja S. Bratseth