Class AbstractFilter<T>

java.lang.Object
com.inductiveautomation.ignition.common.search.AbstractFilter<T>
Type Parameters:
T - The type of object that gets filtered
All Implemented Interfaces:
Condition<T>, Filter<T>, Serializable
Direct Known Subclasses:
PropertySetFilter

public abstract class AbstractFilter<T> extends 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:
  • Constructor Details

    • AbstractFilter

      public AbstractFilter()
  • Method Details

    • passes

      public boolean passes(T value)
      Description copied from interface: Condition
      Returns whether the provided value passes the condition.
      Specified by:
      passes in interface Condition<T>
    • 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 interface Filter<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 interface Filter<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, Object value, boolean passed)
      Can be overridden to log success/failure conditions.
    • toString

      public String toString()
      Overrides:
      toString in class Object