T - Type of container where from can get filterable dataV - Type of filterable datapublic abstract class BaseFilter<T,V>
extends java.lang.Object
Base class for all filters
| Constructor and Description |
|---|
BaseFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
getFilterCondition(V data,
V pattern)
Should return condition that will filter data
|
protected abstract V |
getFilterData(T data)
Used for getting target that should be compared with patter to be filtered or not.
|
protected abstract V |
getFilterPattern()
This pattern will be used for all future filtering.
|
boolean |
passedFilter(ContactData contact)
Main method for filtering contacts
|
protected abstract V getFilterPattern()
This pattern will be used for all future filtering.
protected abstract V getFilterData(T data)
Used for getting target that should be compared with patter to be filtered or not.
data - container where from data could be obtainedprotected abstract boolean getFilterCondition(V data, V pattern)
Should return condition that will filter data
data - target datapattern - pattern to compare withpublic boolean passedFilter(ContactData contact)
Main method for filtering contacts
contact - contact what should get exercised with filter