|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object corny.addressbook.searching.Filter.Filter corny.addressbook.searching.Filter.MetaFilter
public class MetaFilter
Filter class to combine multiple Filters to a more complex one.
Each Filter represents a comparison. Using the MetaFilter class, multiple comparisons can be combined using the conjunctions AND / OR.
Field Summary | |
---|---|
static boolean |
AND
Conjunction |
static boolean |
OR
Disjunction |
Constructor Summary | |
---|---|
MetaFilter(boolean conjunction,
Filter[] children)
Creates a new MetaFilter with the specified conjunction and child Filters. |
Method Summary | |
---|---|
boolean |
appliesToFilter(Contact c)
Used by NativeAddressBook to determine whether the Contact matches the search query |
java.lang.String |
toString()
|
Methods inherited from class corny.addressbook.searching.Filter.Filter |
---|
createFilter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean AND
public static final boolean OR
Constructor Detail |
---|
public MetaFilter(boolean conjunction, Filter[] children)
conjunction
- Either MetaFilter.AND or MetaFilter.ORchildren
- Child filter to be combined using the given conjunctionMethod Detail |
---|
public boolean appliesToFilter(Contact c)
Filter
appliesToFilter
in class Filter
c
- Contact to compare
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |