|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.collections.SequencedHashMap.OrderedIterator
| Field Summary | |
private long |
expectedModCountHolds the expected modification count. |
private SequencedHashMap.Entry |
posHolds the "current" position in the iterator. |
private int |
returnTypeHolds the type that should be returned from the iterator. |
| Constructor Summary | |
SequencedHashMap.OrderedIterator(int returnType)Construct an iterator over the sequenced elements in the order in which they were added. |
|
| Method Summary | |
boolean |
hasNext()Returns whether there is any additional elements in the iterator to be returned. |
java.lang.Object |
next()Returns the next element from the iterator. |
void |
remove()Removes the last element returned from the next() method from the sequenced map. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int returnType
SequencedHashMap.KEY, SequencedHashMap.VALUE, or SequencedHashMap.ENTRY. To save a tiny bit of memory, this field is also used as a marker for when remove has been called on the current object to prevent a second remove on the same element. Essientially, if this value is negative (i.e. the bit specified by SequencedHashMap.REMOVED_MASK is set), the current position has been removed. If positive, remove can still be called.
private SequencedHashMap.Entry pos
private transient long expectedModCount
| Constructor Detail |
public SequencedHashMap.OrderedIterator(int returnType)
next() method returns the type specified by returnType which must be either SequencedHashMap.KEY, SequencedHashMap.VALUE, or SequencedHashMap.ENTRY.
| Method Detail |
public boolean hasNext()
hasNext in interface java.util.Iteratortrue if there are more elements left to be returned from the iterator; false otherwise.public java.lang.Object next()
next in interface java.util.Iteratorjava.util.NoSuchElementException - if there are no more elements in the iterator.java.util.ConcurrentModificationException - if a modification occurs in the underlying map.public void remove()
next() method from the sequenced map.
remove in interface java.util.Iteratorjava.lang.IllegalStateException - if there isn't a "last element" to be removed. That is, if next() has never been called, or if remove() was already called on the element.java.util.ConcurrentModificationException - if a modification occurs in the underlying map.
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||