|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gshute.util.Filters.Compound
A Filters.Compound object combines the acceptance decisions of its constituent filters. This class defines int constants AND, NAND, OR, and NOR to specify the combination mode. When a compound filter is in AND mode it accepts an object when all of its constituent filters accept the object. When a compound filter is in OR mode it accepts an object if any of its constituent filters accept the object. A compound filter with no contituent filters accepts all object if it is in AND or NOR mode and accepts no objects if it is in OR or NAND mode.
| Field Summary | |
static int |
AND
AND is the combination mode value for a compound filter that accepts an object if all of its filters accept the object. |
protected boolean |
defaultValue
defaultValue is the the value returned by the isAcceptable() method of this compound filter when it has no constituent filters. |
protected java.util.Vector |
filters
filters is the vector of constituent filters for this compound filter. |
static int |
NAND
NAND is the combination mode value for a compound filter that accepts an object if at least one of its filters does not accept the object. |
static int |
NOR
NOR is the combination mode value for a compound filter that accepts an object if none of its filters accepts the object. |
static int |
OR
OR is the combination mode value for a compound filter that accepts an object if at least one of its filters accepts the object. |
protected boolean |
stopValue
When this compound filter calls the isAcceptable() method of its constituent filters, it stops after the first returned value that is equal to stopValue and returns !defaultValue. |
| Constructor Summary | |
Filters.Compound()
new Filters.Compound() returns a new compound filter that has mode AND and has no constituent filters. |
|
Filters.Compound(Filter fltr)
new Filters.Compound(fltr) returns a new compound filter that has mode AND and has fltr as its only constituent filter. |
|
Filters.Compound(Filter fltr1,
Filter fltr2)
new Filters.Compound(fltr1, fltr2) returns a new compound filter that has mode AND and has fltr1 and fltr2 as its only constituent filters. |
|
Filters.Compound(Filter fltr1,
Filter fltr2,
int md)
new Filters.Compound(fltr1, fltr2, md) returns a new compound filter that has mode md and has fltr1 and fltr2 as its only constituent filters. |
|
Filters.Compound(Filter fltr,
int md)
new Filters.Compound(fltr, md) returns a new compound filter that has mode md and has fltr as its only constituent filter. |
|
Filters.Compound(int md)
new Filters.Compound(md) returns a new compound filter that has mode md and has no constituent filters. |
|
| Method Summary | |
void |
addFilter(Filter fltr)
cf.addFilter(fltr) adds fltr as a constituent filter of cf. |
boolean |
isAcceptable(java.lang.Object o)
cf.isAcceptable(o) returns true if o is accepted by cf. |
void |
removeFilter(Filter fltr)
cf.removeFilter(fltr) removes the constituent filter fltr from cf. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int NAND
public static final int OR
public static final int AND
public static final int NOR
protected boolean defaultValue
protected boolean stopValue
protected java.util.Vector filters
| Constructor Detail |
public Filters.Compound()
public Filters.Compound(int md)
public Filters.Compound(Filter fltr)
public Filters.Compound(Filter fltr,
int md)
public Filters.Compound(Filter fltr1,
Filter fltr2)
public Filters.Compound(Filter fltr1,
Filter fltr2,
int md)
| Method Detail |
public void addFilter(Filter fltr)
public void removeFilter(Filter fltr)
public boolean isAcceptable(java.lang.Object o)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||