Class DeciderFilter<T>

java.lang.Object
net.ontopia.utils.DeciderFilter<T>
All Implemented Interfaces:
FilterIF<T>

public class DeciderFilter<T> extends Object implements FilterIF<T>
INTERNAL: Filter that filters a collection using a decider. The decider is applied to the individual objects in the collection. If the object is accepted by the decider it will become part of the result.

  • Field Details

  • Constructor Details

    • DeciderFilter

      public DeciderFilter(Predicate<T> decider)
  • Method Details

    • filter

      public Collection<T> filter(Iterator<T> objects)
      Description copied from interface: FilterIF
      INTERNAL: Filters the input iterator and returns a collection containing a subset of the iterator's elements.
      Specified by:
      filter in interface FilterIF<T>