net.sf.staccatocommons.iterators.thriter
Class AbstractThriterator<A>
java.lang.Object
net.sf.staccatocommons.iterators.AbstractUnmodifiableIterator<A>
net.sf.staccatocommons.iterators.thriter.AbstractThriterator<A>
- All Implemented Interfaces:
- Iterator<A>, EmptyAware, Thriter<A>, Thriterator<A>
- Direct Known Subclasses:
- AdvanceThriterator, EmptyThriterator, NextThriterator
public abstract class AbstractThriterator<A>
- extends AbstractUnmodifiableIterator<A>
- implements Thriterator<A>
- Author:
- flbulgarelli
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractThriterator
public AbstractThriterator()
delayedCurrent
public Thunk<A> delayedCurrent()
- Description copied from interface:
Thriter
- Answers a
Thunk that, when evaluated through Thunk.value(),
will return the current element of this Thriter at the time of
being Thriter.delayedCurrent() sent.
This means, that the value of the returned thunk must must
always equals, even if this Thriter was advanced later.
- Specified by:
delayedCurrent in interface Thriter<A>
- Returns:
- a
Thunk tha provides Thriter.current() at the time of this
message being sent.
delayedNext
public final Thunk<A> delayedNext()
- Description copied from interface:
Thriter
- Advances this thriter and the returns
Thriter.delayedCurrent()
- Specified by:
delayedNext in interface Thriter<A>
- Returns:
Thriter.delayedCurrent()
isEmpty
public final boolean isEmpty()
- Description copied from interface:
Thriterator
- Answers if this
Thriterator is empty
- Specified by:
isEmpty in interface EmptyAware- Specified by:
isEmpty in interface Thriterator<A>
- Returns:
!hasNext()