Class InternalNode

java.lang.Object
  extended byInternalNode
All Implemented Interfaces:
NodeInterface

final class InternalNode
extends java.lang.Object
implements NodeInterface


Field Summary
private  java.lang.Object firstChild
          Link to the first child of this node.
private  Info info
          Contains additinaol information about this node (such as lca info).
private  int leftIndex
          The starting index of the branch that leads to this node.
private  int length
          The length of the branch leading to this node.
private  java.lang.Object rightSybling
          Link to the right sybling of this node (if there is one).
private  java.lang.Object suffixLink
          An internal node always has a sufix link.
 
Constructor Summary
(package private) InternalNode()
           
(package private) InternalNode(int leftIndex, int length, java.lang.Object rightSybling, java.lang.Object firstChild)
           
 
Method Summary
(package private)  java.lang.Object getFirstChild()
           
 Info getInfo()
           
 int getLeftIndex()
           
 int getLength()
           
 java.lang.Object getRightSybling()
           
(package private)  java.lang.Object getSuffixLink()
           
(package private)  void setFirstChild(java.lang.Object firstChild)
           
 void setInfo(Info info)
          sets an Info object to this node.
(package private)  void setLeftIndex(int leftIndex)
           
(package private)  void setLength(int length)
           
(package private)  void setRightSybling(java.lang.Object rightSybling)
           
(package private)  void setSuffixLink(java.lang.Object suffixLink)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

leftIndex

private int leftIndex
The starting index of the branch that leads to this node. Note that the index is calculated relatively to the first char of the first string inserted in the tree.


length

private int length
The length of the branch leading to this node.


rightSybling

private java.lang.Object rightSybling
Link to the right sybling of this node (if there is one).


info

private Info info
Contains additinaol information about this node (such as lca info).


firstChild

private java.lang.Object firstChild
Link to the first child of this node. There are always at least two children to this node. The access to the rest of the children is done following the right sybling(s) of the first child.


suffixLink

private java.lang.Object suffixLink
An internal node always has a sufix link.

Constructor Detail

InternalNode

InternalNode()

InternalNode

InternalNode(int leftIndex,
             int length,
             java.lang.Object rightSybling,
             java.lang.Object firstChild)
Method Detail

getFirstChild

final java.lang.Object getFirstChild()

setFirstChild

final void setFirstChild(java.lang.Object firstChild)

getSuffixLink

final java.lang.Object getSuffixLink()

setSuffixLink

final void setSuffixLink(java.lang.Object suffixLink)

getLeftIndex

public final int getLeftIndex()
Specified by:
getLeftIndex in interface NodeInterface
Returns:
the length on the branch leading to this node.

setLeftIndex

final void setLeftIndex(int leftIndex)

getLength

public final int getLength()
Specified by:
getLength in interface NodeInterface
Returns:
the length of the branch leading to this node.

setLength

final void setLength(int length)

getRightSybling

public final java.lang.Object getRightSybling()
Specified by:
getRightSybling in interface NodeInterface
Returns:
the right sybling of this node, if there is one.

setRightSybling

final void setRightSybling(java.lang.Object rightSybling)

getInfo

public final Info getInfo()
Specified by:
getInfo in interface NodeInterface
Returns:
the first Info object that is associated with the node. One example could be the LcaInfo.

setInfo

public final void setInfo(Info info)
sets an Info object to this node. If there is already one, it appends it to a list of Info objects.

Specified by:
setInfo in interface NodeInterface
Returns:
the first Info object that is associated with the node. One example could be the LcaInfo.