Class MappingIterator<S,T>

java.lang.Object
org.infinispan.query.core.impl.MappingIterator<S,T>
Type Parameters:
S - Type of the original iterator
T - Resulting type
All Implemented Interfaces:
AutoCloseable, Iterator<T>, org.infinispan.commons.util.CloseableIterator<T>

public final class MappingIterator<S,T> extends Object implements org.infinispan.commons.util.CloseableIterator<T>
A CloseableIterator decorator that can be sliced and have its elements transformed.
Since:
11.0
  • Constructor Details

    • MappingIterator

      public MappingIterator(org.infinispan.commons.util.CloseableIterator<S> iterator, Function<? super S,? extends T> mapper)
    • MappingIterator

      public MappingIterator(org.infinispan.commons.util.CloseableIterator<S> iterator)
  • Method Details

    • hasNext

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

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

      public MappingIterator<S,T> skip(long skip)
    • limit

      public MappingIterator<S,T> limit(long max)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.infinispan.commons.util.CloseableIterator<S>