Package hudson.util

Class Iterators.FilterIterator<T>

java.lang.Object
hudson.util.Iterators.FilterIterator<T>
All Implemented Interfaces:
Iterator<T>
Direct Known Subclasses:
Iterators.DuplicateFilterIterator
Enclosing class:
Iterators

public abstract static class Iterators.FilterIterator<T> extends Object implements Iterator<T>
Creates a filtered view of another iterator.
Since:
1.150
  • Constructor Details

    • FilterIterator

      protected FilterIterator(Iterator<? extends T> core)
    • FilterIterator

      protected FilterIterator(Iterable<? extends T> core)
  • Method Details

    • filter

      protected abstract boolean filter(T t)
      Filter out items in the original collection.
      Returns:
      true to leave this item and return this item from this iterator. false to hide this item.
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>