Class RewindableIterator<A>
- java.lang.Object
-
- com.jnape.palatable.lambda.internal.iteration.ImmutableIterator<A>
-
- com.jnape.palatable.lambda.internal.iteration.RewindableIterator<A>
-
- All Implemented Interfaces:
java.util.Iterator<A>
public final class RewindableIterator<A> extends ImmutableIterator<A>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RewindableIterator.Cache<A>
-
Field Summary
Fields Modifier and Type Field Description private java.util.Iterator<A>
asIterator
private RewindableIterator.Cache<A>
cache
private boolean
rewound
-
Constructor Summary
Constructors Constructor Description RewindableIterator(java.util.Iterator<A> asIterator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
boolean
isRewound()
A
next()
void
rewind()
-
Methods inherited from class com.jnape.palatable.lambda.internal.iteration.ImmutableIterator
remove
-
-
-
-
Field Detail
-
asIterator
private final java.util.Iterator<A> asIterator
-
cache
private final RewindableIterator.Cache<A> cache
-
rewound
private boolean rewound
-
-
Constructor Detail
-
RewindableIterator
public RewindableIterator(java.util.Iterator<A> asIterator)
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public A next()
-
rewind
public void rewind()
-
isRewound
public boolean isRewound()
-
-