|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clapper.util.classutil.OrClassFilter
public final class OrClassFilter
An OrClassFilter contains logically ORs other
ClassFilter objects. When its accept()
method is called, the OrClassFilter object passes
the class name through the contained filters. The class name is
accepted if it is accepted by any one of the contained filters. This
class conceptually provides a logical "OR" operator for class name
filters.
The contained filters are applied in the order they were added to
the OrClassFilter object. This class's
accept() method stops looping over the contained filters
as soon as it encounters one whose accept() method returns
true (implementing a "short-circuited OR" operation.)
ClassFilter,
OrClassFilter,
NotClassFilter,
ClassFinder| Constructor Summary | |
|---|---|
OrClassFilter()
Construct a new OrClassFilter with no contained filters. |
|
OrClassFilter(ClassFilter... filters)
Construct a new OrClassFilter with two contained filters. |
|
| Method Summary | |
|---|---|
boolean |
accept(ClassInfo classInfo,
ClassFinder classFinder)
Determine whether a class name is to be accepted or not, based on the contained filters. |
OrClassFilter |
addFilter(ClassFilter filter)
Add a filter to the set of contained filters. |
java.util.Collection<ClassFilter> |
getFilters()
Get the contained filters, as an unmodifiable collection. |
int |
getTotalFilters()
Get the total number of contained filter objects (not counting any filter objects they, in turn, contain). |
void |
removeFilter(ClassFilter filter)
Remove a filter from the set of contained filters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OrClassFilter()
public OrClassFilter(ClassFilter... filters)
addFilter() method.
filters - filters to add| Method Detail |
|---|
public OrClassFilter addFilter(ClassFilter filter)
filter - the ClassFilter to add.
removeFilter(org.clapper.util.classutil.ClassFilter)public void removeFilter(ClassFilter filter)
filter - the ClassFilter to remove.addFilter(org.clapper.util.classutil.ClassFilter)public java.util.Collection<ClassFilter> getFilters()
public int getTotalFilters()
public boolean accept(ClassInfo classInfo,
ClassFinder classFinder)
Determine whether a class name is to be accepted or not, based on
the contained filters. The class name name is accepted if any
one of the contained filters accepts it. This method stops
looping over the contained filters as soon as it encounters one
whose accept() method returns
true (implementing a "short-circuited OR" operation.)
If the set of contained filters is empty, then this method returns true.
accept in interface ClassFilterclassInfo - the ClassInfo object to testclassFinder - the invoking ClassFinder object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||