Class AbstractFilter<T>
- java.lang.Object
-
- com.inductiveautomation.ignition.common.alarming.query.AbstractFilter<T>
-
- Type Parameters:
T
- The type of object that gets filtered
- Direct Known Subclasses:
AlarmFilter
public abstract class AbstractFilter<T> extends java.lang.Object implements Filter<T>
The base implementation of a filter. A filter, simply put, is a group of conditions that operate against a type T. It can answer "does this T value match our conditions".- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <F extends AbstractFilter<T>,V,C extends Condition<V>>
Fand(Field<T,V,C> field, C condition)
<V,C extends Condition<V>>
CgetConditionFor(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()
-
-
-
Method Detail
-
passes
public boolean passes(T value)
Description copied from interface:Condition
Returns whether the provided value passes the condition.
-
hasConditionFor
public boolean hasConditionFor(Field<T,?,?> field)
Description copied from interface:Filter
Returns whether the filter has a condition for the field.- Specified by:
hasConditionFor
in interfaceFilter<T>
-
getConditionFor
public <V,C extends Condition<V>> C getConditionFor(Field<T,V,C> field)
Description copied from interface:Filter
Returns the condition for the field, or null if it doesn't exist.- Specified by:
getConditionFor
in interfaceFilter<T>
-
and
public <F extends AbstractFilter<T>,V,C extends Condition<V>> F and(Field<T,V,C> field, C condition)
-
logCondition
protected void logCondition(Condition<?> c, java.lang.Object value, boolean passed)
Can be overridden to log success/failure conditions.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-