info.aduna.collections.iterators
Class OffsetIterator<E>

java.lang.Object
  extended by info.aduna.iteration.CloseableIterationBase<E,X>
      extended by info.aduna.iteration.IterationWrapper<E,X>
          extended by info.aduna.iteration.FilterIteration<E,X>
              extended by info.aduna.iteration.OffsetIteration<E,RuntimeException>
                  extended by info.aduna.collections.iterators.OffsetIterator<E>
All Implemented Interfaces:
CloseableIterator<E>, CloseableIteration<E,RuntimeException>, Iteration<E,RuntimeException>, Closeable, Iterator<E>

public class OffsetIterator<E>
extends OffsetIteration<E,RuntimeException>
implements CloseableIterator<E>

An iterator that skips the first offset elements from an underlying iterator.


Field Summary
 
Fields inherited from class info.aduna.iteration.IterationWrapper
wrappedIter
 
Fields inherited from class info.aduna.iteration.CloseableIterationBase
logger
 
Constructor Summary
OffsetIterator(Iterator<E> iter, int offset)
          Creates a new OffsetIterator.
 
Method Summary
 
Methods inherited from class info.aduna.iteration.OffsetIteration
accept
 
Methods inherited from class info.aduna.iteration.FilterIteration
handleClose, hasNext, next
 
Methods inherited from class info.aduna.iteration.IterationWrapper
remove
 
Methods inherited from class info.aduna.iteration.CloseableIterationBase
close, isClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.aduna.collections.iterators.CloseableIterator
close
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

OffsetIterator

public OffsetIterator(Iterator<E> iter,
                      int offset)
Creates a new OffsetIterator.

Parameters:
iter - The underlying iterator, must not be null.
offset - The number of elements to skip, must be larger than or equal to 0.


Copyright © 1997-2008 Aduna. All Rights Reserved.