|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsheets.ext.assertion.ConstMultiIntervalIterator
public class ConstMultiIntervalIterator
An iterator wrapper used by MultiInterval to be able to expose the intervals contained in the MultiInterval without allowing the user to modify the underlying collection directly.
| Constructor Summary | |
|---|---|
protected |
ConstMultiIntervalIterator(Iterator<Interval> iter)
Creates a new "const"-iterator using the iterator specified for all operations except remove. |
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the iteration has more elements. |
Interval |
next()
Returns the next element in the iteration. |
void |
remove()
Throws UnsupportedOperationException since this iterator does not allow modification of the unerlying collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ConstMultiIntervalIterator(Iterator<Interval> iter)
iter - the iterator to use for iteration.| Method Detail |
|---|
public boolean hasNext()
true if the iteration has more elements.
(In other words, returns true if next would return
an element rather than throwing an exception.)
hasNext in interface Iterator<Interval>false otherwise.public Interval next()
hasNext() method returns false will return each element
in the underlying collection exactly once.
next in interface Iterator<Interval>NoSuchElementException - iteration has no more elements.public void remove()
remove in interface Iterator<Interval>UnsupportedOperationException - whenever called.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||