org.eclipse.actf.model.traverse
Class AbstractNodeWalker
java.lang.Object
org.eclipse.actf.model.traverse.AbstractNodeWalker
- All Implemented Interfaces:
- INodeWalker
- Direct Known Subclasses:
- AbstractTreeNodeWalker
public abstract class AbstractNodeWalker
- extends Object
- implements INodeWalker
base implementation for any node walker. Clients should subclass this class rather than
attempting to implement all of INodeWalker
.
- Author:
- Mike Squillace
Method Summary |
void |
addNodeFilter(INodeFilter filter)
adds a filter to the list of filters through which nodes will be passed when
successor nodes are retrieved via the getFilteredSuccessorNodes method. |
INodeFilter[] |
removeAllFilters()
removes all filters from this walker |
void |
removeNodeFilter(INodeFilter filter)
removes the specified filter from the list of filters through which a node is passed when
getFilteredSuccessorNodes is called. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nodeFilters
protected LinkedList nodeFilters
AbstractNodeWalker
public AbstractNodeWalker()
addNodeFilter
public void addNodeFilter(INodeFilter filter)
- adds a filter to the list of filters through which nodes will be passed when
successor nodes are retrieved via the
getFilteredSuccessorNodes
method.
If an identical filter is already in the list of filters, this method does nothing.
- Specified by:
addNodeFilter
in interface INodeWalker
- See Also:
INodeWalker.getFilteredSuccessorNodes(Object)
removeAllFilters
public INodeFilter[] removeAllFilters()
- removes all filters from this walker
- Specified by:
removeAllFilters
in interface INodeWalker
- Returns:
- all removed filters
removeNodeFilter
public void removeNodeFilter(INodeFilter filter)
- Description copied from interface:
INodeWalker
- removes the specified filter from the list of filters through which a node is passed when
getFilteredSuccessorNodes
is called.
- Specified by:
removeNodeFilter
in interface INodeWalker
- See Also:
INodeWalker.getFilteredSuccessorNodes(Object)