net.ggtools.grand.filters
Class NodeRemoverFilter

java.lang.Object
  extended by net.ggtools.grand.filters.AbstractGraphFilter
      extended by net.ggtools.grand.filters.NodeRemoverFilter
All Implemented Interfaces:
GraphFilter, GraphConsumer, GraphProducer

public class NodeRemoverFilter
extends AbstractGraphFilter

A filter to remove one or more node from a graph.

Author:
Christophe Labouisse

Field Summary
 
Fields inherited from class net.ggtools.grand.filters.AbstractGraphFilter
name
 
Constructor Summary
NodeRemoverFilter(java.util.Collection nodesToRemove)
          Creates a new node remover filter.
 
Method Summary
protected  java.util.Collection getFilteredNodes()
          Get the nodes from the graph that pass the filter.
 
Methods inherited from class net.ggtools.grand.filters.AbstractGraphFilter
getGraph, getGraphProducer, getName, getProducersGraph, setProducer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeRemoverFilter

public NodeRemoverFilter(java.util.Collection nodesToRemove)
Creates a new node remover filter.

Parameters:
nodesToRemove - a collection of node names to remove.
Method Detail

getFilteredNodes

protected java.util.Collection getFilteredNodes()
                                         throws GrandException
Description copied from class: AbstractGraphFilter
Get the nodes from the graph that pass the filter. This method should not alter the input graph. The returned collection may be read only and return UnsupportedOperationExceptionon modification methods.

Specified by:
getFilteredNodes in class AbstractGraphFilter
Returns:
a collection of nodes.
Throws:
GrandException - if the filtering cannot be done


Copyright © 2004-2005 ggTools. All Rights Reserved.