T
- The type of object that gets filteredpublic abstract class AbstractFilter<T> extends java.lang.Object implements Filter<T>
Constructor and Description |
---|
AbstractFilter() |
Modifier and Type | Method and Description |
---|---|
<F extends AbstractFilter<T>,V,C extends Condition<V>> |
and(Field<T,V,C> field,
C condition) |
<V,C extends Condition<V>> |
getConditionFor(Field<T,V,C> field)
Returns the condition for the field, or null if it doesn't exist.
|
boolean |
hasConditionFor(Field<T,?,?> field)
Returns whether the filter has a condition for the field.
|
protected void |
logCondition(Condition<?> c,
java.lang.Object value,
boolean passed)
Can be overridden to log success/failure conditions.
|
boolean |
passes(T value)
Returns whether the provided value passes the condition.
|
java.lang.String |
toString() |
public boolean passes(T value)
Condition
public boolean hasConditionFor(Field<T,?,?> field)
Filter
hasConditionFor
in interface Filter<T>
public <V,C extends Condition<V>> C getConditionFor(Field<T,V,C> field)
Filter
getConditionFor
in interface Filter<T>
public <F extends AbstractFilter<T>,V,C extends Condition<V>> F and(Field<T,V,C> field, C condition)
protected void logCondition(Condition<?> c, java.lang.Object value, boolean passed)
c
- passed
- public java.lang.String toString()
toString
in class java.lang.Object