net.obsearch.example.ted
Class SliceForestStd
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SliceForestStd
public SliceForestStd()
SliceForestStd
public SliceForestStd(SliceASTForStandardTed t)
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.