Class Annotation

java.lang.Object
  extended byAnnotation
All Implemented Interfaces:
Info

public class Annotation
extends java.lang.Object
implements Info

An example of the kind of information that can be attached to the nodes of the suffix tree: here, the sum of the length of all the labels on the path from the root to the current node.


Field Summary
private  Info next
           
private  int pathLength
           
 
Constructor Summary
(package private) Annotation(int pathLength)
          Stores pathLen in this Annotation object.
 
Method Summary
private static void addPathLength(int prefix, NodeInterface node)
           
static void addPathLength(SuffixTree tree)
          A class method to decorate a tree with pathLen information at each node.
 Info getNextInfo()
          Returns the next element of information stored at that node.
 int getPathLength()
          Returns the pathLen.
 void setNextInfo(Info next)
          Add an element of information to this node.
 java.lang.String toString()
          Returns a String representation of this and the following elements of information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pathLength

private int pathLength

next

private Info next
Constructor Detail

Annotation

Annotation(int pathLength)
Stores pathLen in this Annotation object.

Method Detail

getNextInfo

public Info getNextInfo()
Returns the next element of information stored at that node.

Specified by:
getNextInfo in interface Info
Returns:
the next element of information stored at that node.

setNextInfo

public void setNextInfo(Info next)
Add an element of information to this node.

Specified by:
setNextInfo in interface Info

getPathLength

public int getPathLength()
Returns the pathLen.

Returns:
the pathLen.

addPathLength

public static void addPathLength(SuffixTree tree)
A class method to decorate a tree with pathLen information at each node.


addPathLength

private static void addPathLength(int prefix,
                                  NodeInterface node)

toString

public java.lang.String toString()
Returns a String representation of this and the following elements of information.

Returns:
a String representation of this and the following elements of information.