Class ListRandomIterator.IndexFilter

java.lang.Object
com.globalmentor.collections.iterators.ListRandomIterator.IndexFilter
All Implemented Interfaces:
Filter<Integer>
Enclosing class:
ListRandomIterator<E>

protected class ListRandomIterator.IndexFilter extends Object implements Filter<Integer>
A class that filters random integers based upon whether the object at the given index in our list passes the criteria of our local filter.
Author:
Garret Wilson
  • Constructor Details

    • IndexFilter

      protected IndexFilter()
  • Method Details

    • isPass

      public boolean isPass(Integer integer)
      Determines whether a given object should pass through the filter or be filtered out. An integer object will be filtered out if the object at that index in our list doesn't pass our main list filter.
      Specified by:
      isPass in interface Filter<Integer>
      Parameters:
      integer - The integer to filter.
      Returns:
      true if the object should pass through the filter, else false if the object should be filtered out.