Class IteratorSlotted<T>

java.lang.Object
org.apache.jena.atlas.iterator.IteratorSlotted<T>
All Implemented Interfaces:
Iterator<T>, IteratorCloseable<T>, Closeable
Direct Known Subclasses:
IteratorTruncate

public abstract class IteratorSlotted<T> extends Object implements IteratorCloseable<T>
An Iterator with a one slot lookahead.
  • Method Details

    • hasNext

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

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

      public final T peek()
      Look at the next element - returns null when there is no element
    • peek

      public final T peek(T dft)
      Look at the next element - returns dft when there is no element
    • close

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