Class SetFilter<T>

  • All Implemented Interfaces:
    IFilter<T>

    public class SetFilter<T>
    extends java.lang.Object
    implements IFilter<T>
    Simple set based filter that checks if a value is contained in the set.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Set<T> vals
      The allowed values.
    • Constructor Summary

      Constructors 
      Constructor Description
      SetFilter​(java.util.Set<T> vals)
      Create a new filter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean filter​(T obj)
      Test if value is contained in filter.
      java.util.Set<T> getValues()
      Get the vals.
      void setValues​(java.util.Set<T> vals)
      Set the vals.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • vals

        protected java.util.Set<T> vals
        The allowed values.
    • Constructor Detail

      • SetFilter

        public SetFilter​(java.util.Set<T> vals)
        Create a new filter.
        Parameters:
        vals - The values.
    • Method Detail

      • filter

        public boolean filter​(T obj)
        Test if value is contained in filter.
        Specified by:
        filter in interface IFilter<T>
        Parameters:
        obj - the
        Returns:
        True, if passes the filter.
      • getValues

        public java.util.Set<T> getValues()
        Get the vals. return The vals.
      • setValues

        public void setValues​(java.util.Set<T> vals)
        Set the vals.
        Parameters:
        vals - The vals to set.