Class FilterIterator<T>

java.lang.Object
org.apache.iceberg.io.FilterIterator<T>
Type Parameters:
T - the type of objects produced by this Iterator
All Implemented Interfaces:
Closeable, AutoCloseable, Iterator<T>, CloseableIterator<T>

public abstract class FilterIterator<T> extends Object implements CloseableIterator<T>
An Iterator that filters another Iterator.
  • Constructor Details

    • FilterIterator

      protected FilterIterator(Iterator<T> items)
  • Method Details

    • shouldKeep

      protected abstract boolean shouldKeep(T item)
    • hasNext

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

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

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable