Package org.apache.commons.collections
Class DoubleOrderedMap.DoubleOrderedMapIterator
- java.lang.Object
-
- org.apache.commons.collections.DoubleOrderedMap.DoubleOrderedMapIterator
-
- All Implemented Interfaces:
java.util.Iterator
- Enclosing class:
- DoubleOrderedMap
private abstract class DoubleOrderedMap.DoubleOrderedMapIterator extends java.lang.Object implements java.util.Iterator
-
-
Field Summary
Fields Modifier and Type Field Description private int
expectedModifications
private int
iteratorType
protected DoubleOrderedMap.Node
lastReturnedNode
private DoubleOrderedMap.Node
nextNode
-
Constructor Summary
Constructors Constructor Description DoubleOrderedMapIterator(int type)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.Object
doGetNext()
boolean
hasNext()
java.lang.Object
next()
void
remove()
Removes from the underlying collection the last element returned by the iterator.
-
-
-
Field Detail
-
expectedModifications
private int expectedModifications
-
lastReturnedNode
protected DoubleOrderedMap.Node lastReturnedNode
-
nextNode
private DoubleOrderedMap.Node nextNode
-
iteratorType
private int iteratorType
-
-
Method Detail
-
doGetNext
protected abstract java.lang.Object doGetNext()
- Returns:
- 'next', whatever that means for a given kind of DoubleOrderedMapIterator
-
hasNext
public final boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator
- Returns:
- true if the iterator has more elements.
-
next
public final java.lang.Object next() throws java.util.NoSuchElementException, java.util.ConcurrentModificationException
- Specified by:
next
in interfacejava.util.Iterator
- Returns:
- the next element in the iteration.
- Throws:
java.util.NoSuchElementException
- if iteration has no more elements.java.util.ConcurrentModificationException
- if the DoubleOrderedMap is modified behind the iterator's back
-
remove
public final void remove() throws java.lang.IllegalStateException, java.util.ConcurrentModificationException
Removes from the underlying collection the last element returned by the iterator. This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.- Specified by:
remove
in interfacejava.util.Iterator
- Throws:
java.lang.IllegalStateException
- if the next method has not yet been called, or the remove method has already been called after the last call to the next method.java.util.ConcurrentModificationException
- if the DoubleOrderedMap is modified behind the iterator's back
-
-