qflib 0.98.1

de.qfs.lib.tree
Interface MutableTraversal

All Superinterfaces:
Traversal
All Known Implementing Classes:
IndexTraversal

public interface MutableTraversal
extends Traversal

Extension of the Traversal interface that enables modification of the tree during traversal.

Since:
0.98.1
Version:
$Revision: 1.3 $
Author:
Gregor Schmid

Method Summary
 boolean insertNodeAfter(java.lang.Object node)
          Insert a node after the current node of the traversal.
 boolean insertNodeBefore(java.lang.Object node)
          Insert a node before the current node of the traversal.
 void nodeInsertedAfter(java.lang.Object node)
          Notify the traversal that a node has been inserted after the currently visited node.
 void nodeInsertedBefore(java.lang.Object node)
          Notify the traversal that a node has been inserted before the currently visited node.
 void nodeRemoved()
          Notify the traversal that the currently visited node has been removed.
 boolean removeNode()
          Remove the current node of the traversal.
 
Methods inherited from interface de.qfs.lib.tree.Traversal
finish, getAdapter, getIndex, getNode, getParent, getPath, getPreviousSibling, getUserObject, setUserObject
 

Method Detail

removeNode

public boolean removeNode()
Remove the current node of the traversal.
Returns:
True if the node could be removed, false otherwise.

nodeRemoved

public void nodeRemoved()
Notify the traversal that the currently visited node has been removed.

insertNodeBefore

public boolean insertNodeBefore(java.lang.Object node)
Insert a node before the current node of the traversal.
Parameters:
node - The node to insert.
Returns:
True if the node could be inserted, false if not.

nodeInsertedBefore

public void nodeInsertedBefore(java.lang.Object node)
Notify the traversal that a node has been inserted before the currently visited node.
Parameters:
node - The inserted node which will become the node returned by getPreviousSibling.

insertNodeAfter

public boolean insertNodeAfter(java.lang.Object node)
Insert a node after the current node of the traversal.
Parameters:
node - The node to insert.
Returns:
True if the node could be inserted, false if not.

nodeInsertedAfter

public void nodeInsertedAfter(java.lang.Object node)
Notify the traversal that a node has been inserted after the currently visited node.
Parameters:
node - The inserted node.

qflib 0.98.1