net.obsearch.example.ted
Class SliceForestStd

java.lang.Object
  extended by net.obsearch.example.ted.SliceForestStd
All Implemented Interfaces:
SliceForest

public class SliceForestStd
extends java.lang.Object
implements SliceForest

This class only keeps an artificial root node above all the children to simulate a forest! This is to match the ideas of the papers

Author:
amuller

Constructor Summary
SliceForestStd()
           
SliceForestStd(SliceASTForStandardTed t)
           
 
Method Summary
protected  void appendSiblings(SliceASTForStandardTed x)
          Adds at the end of the forest (right) the given SliceAST and all his sibblings
 void calculateHeavyPath()
           
 SliceForestStd deleteLeftTree()
           
 SliceForestStd deleteLeftTreeNode()
           
protected  void deleteLeftTreeNodeDestructive()
           
 SliceForestStd deleteRightTree()
           
 SliceForestStd deleteRightTreeNode()
           
protected  void deleteRightTreeNodeDestructive()
           
 SliceForestStd deleteRootOnLeftTreeAndGetLeftTree()
           
 SliceForestStd deleteRootOnRightTreeAndGetRightTree()
          return the rightmost tree of the Forest without the root node
 boolean equalsTree(SliceForest o)
           
 SliceASTForStandardTed getLeftTree()
           
 SliceASTForStandardTed getRightTree()
           
 int getSize()
           
 java.lang.String hashString()
           
protected  void insertSiblings(SliceASTForStandardTed x)
           
 boolean isLeftHeavy()
           
 boolean isNull()
           
 boolean isTree()
           
 java.lang.String prettyPrint()
           
 SliceForestStd shallowCloneForest()
          Just creates a new array without copying the trees
 java.lang.String toFuriaChanTree()
           
 java.util.List<SliceForest> topLight()
           
protected  void updateCachedData()
           
 void updateContains()
           
 void updateDescendant()
           
 void updateIdInfo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliceForestStd

public SliceForestStd()

SliceForestStd

public SliceForestStd(SliceASTForStandardTed t)
Method Detail

isLeftHeavy

public boolean isLeftHeavy()
Specified by:
isLeftHeavy in interface SliceForest

getSize

public int getSize()
Specified by:
getSize in interface SliceForest

isTree

public boolean isTree()
Specified by:
isTree in interface SliceForest

updateDescendant

public void updateDescendant()
Specified by:
updateDescendant in interface SliceForest

updateIdInfo

public void updateIdInfo()
Specified by:
updateIdInfo in interface SliceForest

updateContains

public void updateContains()
Specified by:
updateContains in interface SliceForest

updateCachedData

protected void updateCachedData()

shallowCloneForest

public final SliceForestStd shallowCloneForest()
Just creates a new array without copying the trees


appendSiblings

protected final void appendSiblings(SliceASTForStandardTed x)
Adds at the end of the forest (right) the given SliceAST and all his sibblings


insertSiblings

protected final void insertSiblings(SliceASTForStandardTed x)

deleteRightTreeNode

public final SliceForestStd deleteRightTreeNode()
Specified by:
deleteRightTreeNode in interface SliceForest

deleteLeftTreeNode

public final SliceForestStd deleteLeftTreeNode()
Specified by:
deleteLeftTreeNode in interface SliceForest

deleteRightTreeNodeDestructive

protected final void deleteRightTreeNodeDestructive()

deleteLeftTreeNodeDestructive

protected final void deleteLeftTreeNodeDestructive()

deleteRightTree

public final SliceForestStd deleteRightTree()
Specified by:
deleteRightTree in interface SliceForest

deleteLeftTree

public final SliceForestStd deleteLeftTree()
Specified by:
deleteLeftTree in interface SliceForest

getRightTree

public final SliceASTForStandardTed getRightTree()
Specified by:
getRightTree in interface SliceForest

getLeftTree

public final SliceASTForStandardTed getLeftTree()
Specified by:
getLeftTree in interface SliceForest

isNull

public final boolean isNull()
Specified by:
isNull in interface SliceForest

calculateHeavyPath

public void calculateHeavyPath()
Specified by:
calculateHeavyPath in interface SliceForest

topLight

public java.util.List<SliceForest> topLight()
Specified by:
topLight in interface SliceForest

deleteRootOnRightTreeAndGetRightTree

public final SliceForestStd deleteRootOnRightTreeAndGetRightTree()
Description copied from interface: SliceForest
return the rightmost tree of the Forest without the root node

Specified by:
deleteRootOnRightTreeAndGetRightTree in interface SliceForest

deleteRootOnLeftTreeAndGetLeftTree

public final SliceForestStd deleteRootOnLeftTreeAndGetLeftTree()
Specified by:
deleteRootOnLeftTreeAndGetLeftTree in interface SliceForest

hashString

public final java.lang.String hashString()
Specified by:
hashString in interface SliceForest

prettyPrint

public java.lang.String prettyPrint()
Specified by:
prettyPrint in interface SliceForest

equalsTree

public boolean equalsTree(SliceForest o)
Specified by:
equalsTree in interface SliceForest

toFuriaChanTree

public final java.lang.String toFuriaChanTree()
Specified by:
toFuriaChanTree in interface SliceForest


Copyright © 2007-2008 Arnoldo Jose Muller Molina. All Rights Reserved.