Class ListRandomIterator.IndexFilter

  • All Implemented Interfaces:
    Filter<java.lang.Integer>
    Enclosing class:
    ListRandomIterator<E>

    protected class ListRandomIterator.IndexFilter
    extends java.lang.Object
    implements Filter<java.lang.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 Summary

      Constructors 
      Modifier Constructor Description
      protected IndexFilter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isPass​(java.lang.Integer integer)
      Determines whether a given object should pass through the filter or be filtered out.
      • Methods inherited from class java.lang.Object

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

      • IndexFilter

        protected IndexFilter()
    • Method Detail

      • isPass

        public boolean isPass​(java.lang.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<java.lang.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.