Package jadex.common

Class ConstantFilter<T>

java.lang.Object
jadex.common.ConstantFilter<T>
All Implemented Interfaces:
IFilter<T>

public class ConstantFilter<T> extends Object implements IFilter<T>
Filter with fixed return value.
  • Field Details

    • value

      protected boolean value
      The return value.
  • Constructor Details

    • ConstantFilter

      public ConstantFilter()
      Create filter instance.
    • ConstantFilter

      public ConstantFilter(boolean value)
      Create filter instance.
  • Method Details

    • filter

      public boolean filter(T obj)
      Test if an object passes the filter.
      Specified by:
      filter in interface IFilter<T>
      Returns:
      True, if passes the filter.
    • isValue

      public boolean isValue()
      Get the value.
      Returns:
      the value.
    • setValue

      public void setValue(boolean value)
      Set the value.
      Parameters:
      value - The value to set.
    • equals

      public boolean equals(Object obj)
      Is equal?
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object