Package org.cactoos.iterator
Class Sliced<T>
- java.lang.Object
-
- org.cactoos.iterator.Sliced<T>
-
- Type Parameters:
T
- The type of the iterator.
- All Implemented Interfaces:
Iterator<T>
public final class Sliced<T> extends Object implements Iterator<T>
Creates an iterator returning an interval(slice) of the original iterator by means of providing starting index, number of elements to retrieve from the starting index and a decorated original iterator. Can be used to retrieve the head, tail or a portion in the middle of the original iterator.There is no thread-safety guarantee.
- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
T
next()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-