|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.graph.filters.SerialFilter
This is a generic filter that takes at least two other filters
and runs them seially. That is, it filters first on F1,
and then on F2. Note that it stores links to the filters;
mutable filters therefore are at risk of causing odd side effects:
Filter f1 = new HeightFilter( "tall" );
Filter f2 = new ColorFilter("Green");
Filter serial = new SerialFilter( f1, f2 );
Graph tallGreen = serial.filter( graph ).assemble();
// this contains all tall, green things
f1.setHeight("short")
// careful, f1 is stored in serial!
Graph otherGreen = serial.filter( graph ).assemble();
// this now contains all short green things.
Constructor Summary | |
SerialFilter()
Creates an empty list of filters. |
|
SerialFilter(Filter f1,
Filter f2)
Small constructor for two filters. |
|
SerialFilter(java.util.List filters)
Constructor for an arbitrary list of filters. |
Method Summary | |
void |
append(Filter f)
Adds a filter to the end of the sequence of filters. |
UnassembledGraph |
filter(Graph g)
Runs through the sequence of filters, one at a time. |
UnassembledGraph |
filter(UnassembledGraph g)
Runs through the sequence of filters, one at a time. |
java.lang.String |
getName()
Returns the name of the serial filter. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SerialFilter(Filter f1, Filter f2)
f1
- The first filter.f2
- The second filter.public SerialFilter(java.util.List filters)
public SerialFilter()
TrivialFilter
Method Detail |
public java.lang.String getName()
getName
in interface Filter
public void append(Filter f)
f
- Adds the filter to the end of the list.public UnassembledGraph filter(Graph g)
filter
in interface Filter
g
- An input graph to be filtered.
public UnassembledGraph filter(UnassembledGraph g)
filter
in interface EfficientFilter
g
- An unassembled graph to be filtered.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |