|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.staccatocommons.iterators.AbstractUnmodifiableIterator<A>
net.sf.staccatocommons.iterators.thriter.AbstractThriterator<A>
net.sf.staccatocommons.iterators.thriter.AdvanceThriterator<A>
net.sf.staccatocommons.iterators.PrependThriterator<A>
public class PrependThriterator<A>
| Constructor Summary | |
|---|---|
PrependThriterator(A element,
Iterator<? extends A> iterator)
Creates a new PrependThriterator |
|
PrependThriterator(A element,
Thriter<? extends A> iterator)
Creates a new PrependThriterator |
|
PrependThriterator(A element,
Thriterator<? extends A> iterator)
Creates a new PrependThriterator |
|
| Method Summary | |
|---|---|
void |
advanceNext()
Advances to the thriter to the position of the next element. |
A |
current()
Answers element at the current position of this Thriter. |
Thunk<A> |
delayedCurrent()
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. |
protected Thunk<A> |
elementThunk()
|
protected A |
elementValue()
|
boolean |
hasNext()
Answers if the thriter has more elements, that is, if sending Thriter.advanceNext() would not result in a NoSuchElementException |
String |
toString()
|
| Methods inherited from class net.sf.staccatocommons.iterators.thriter.AdvanceThriterator |
|---|
next |
| Methods inherited from class net.sf.staccatocommons.iterators.thriter.AbstractThriterator |
|---|
delayedNext, isEmpty |
| Methods inherited from class net.sf.staccatocommons.iterators.AbstractUnmodifiableIterator |
|---|
remove |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Iterator |
|---|
remove |
| Constructor Detail |
|---|
public PrependThriterator(A element,
Thriter<? extends A> iterator)
PrependThriterator
public PrependThriterator(A element,
Iterator<? extends A> iterator)
PrependThriterator
public PrependThriterator(A element,
Thriterator<? extends A> iterator)
PrependThriterator
| Method Detail |
|---|
public final boolean hasNext()
ThriterThriter.advanceNext() would not result in a NoSuchElementException
Thriter has more elements
public final void advanceNext()
throws NoSuchElementException
Thriter
NoSuchElementException - if there are no more elements
public final A current()
throws NoSuchElementException
ThriterThriter. Result of
this method if Thriter.advanceNext() was never evaluated before is
undefined.
NoSuchElementExceptionprotected A elementValue()
protected Thunk<A> elementThunk()
public Thunk<A> delayedCurrent()
ThriterThunk 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.
delayedCurrent in interface Thriter<A>delayedCurrent in class AbstractThriterator<A>Thunk tha provides Thriter.current() at the time of this
message being sent.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||