Package org.eclipse.emf.common.util
Class BasicEMap.BasicEMapIterator<U>
java.lang.Object
org.eclipse.emf.common.util.BasicEMap.BasicEMapIterator<U>
- All Implemented Interfaces:
Iterator<U>
- Direct Known Subclasses:
BasicEMap.BasicEMapKeyIterator,BasicEMap.BasicEMapValueIterator
An iterator over the map entry data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe cursor in the entry data.protected intThe cursor in the list of entries.protected intThe modification count expected of the map.protected intThe last cursor in the entry data.protected intThe cursor in the list of entries. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()Returns whether there are more objects.next()Returns the next object and advances the iterator.voidremove()Removes the entry of the last object returned bynext()from the map, it's an optional operation.protected voidscan()Scans to the new entry.protected Uyield(BasicEMap.Entry<K, V> entry) Called to yield the iterator result for the entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
cursor
protected int cursorThe cursor in the entry data. -
entryCursor
protected int entryCursorThe cursor in the list of entries. -
lastCursor
protected int lastCursorThe last cursor in the entry data. -
lastEntryCursor
protected int lastEntryCursorThe cursor in the list of entries. -
expectedModCount
protected int expectedModCountThe modification count expected of the map.
-
-
Method Details
-
yield
Called to yield the iterator result for the entry. This implementation returns the entry itself.- Parameters:
entry- the entry.- Returns:
- the iterator result for the entry.
-
scan
protected void scan()Scans to the new entry. -
hasNext
public boolean hasNext()Returns whether there are more objects. -
next
Returns the next object and advances the iterator.- Specified by:
nextin interfaceIterator<U>- Returns:
- the next object.
- Throws:
NoSuchElementException- if the iterator is done.
-
remove
public void remove()Removes the entry of the last object returned bynext()from the map, it's an optional operation.- Specified by:
removein interfaceIterator<U>- Throws:
IllegalStateException- ifnexthas not yet been called, orremovehas already been called after the last call tonext.
-