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
Enclosing class:
BasicEMap<K,V>

protected class BasicEMap.BasicEMapIterator<U> extends Object implements Iterator<U>
An iterator over the map entry data.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    The cursor in the entry data.
    protected int
    The cursor in the list of entries.
    protected int
    The modification count expected of the map.
    protected int
    The last cursor in the entry data.
    protected int
    The cursor in the list of entries.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether there are more objects.
    Returns the next object and advances the iterator.
    void
    Removes the entry of the last object returned by next() from the map, it's an optional operation.
    protected void
    Scans to the new entry.
    protected U
    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, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining
  • Field Details

    • cursor

      protected int cursor
      The cursor in the entry data.
    • entryCursor

      protected int entryCursor
      The cursor in the list of entries.
    • lastCursor

      protected int lastCursor
      The last cursor in the entry data.
    • lastEntryCursor

      protected int lastEntryCursor
      The cursor in the list of entries.
    • expectedModCount

      protected int expectedModCount
      The modification count expected of the map.
  • Method Details

    • yield

      protected U yield(BasicEMap.Entry<K,V> entry)
      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.
      Specified by:
      hasNext in interface Iterator<U>
      Returns:
      whether there are more objects.
    • next

      public U next()
      Returns the next object and advances the iterator.
      Specified by:
      next in interface Iterator<U>
      Returns:
      the next object.
      Throws:
      NoSuchElementException - if the iterator is done.
    • remove

      public void remove()
      Removes the entry of the last object returned by next() from the map, it's an optional operation.
      Specified by:
      remove in interface Iterator<U>
      Throws:
      IllegalStateException - if next has not yet been called, or remove has already been called after the last call to next.