Class FailFastIterator<E>

java.lang.Object
org.jhotdraw8.collection.iterator.FailFastIterator<E>
Type Parameters:
E - the element type
All Implemented Interfaces:
Iterator<E>

public class FailFastIterator<E> extends Object implements Iterator<E>
An iterator that fails when a provided modification counter does not have an expected value.
  • Constructor Details

  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<E>
    • next

      public E next()
      Specified by:
      next in interface Iterator<E>
    • ensureUnmodified

      protected void ensureUnmodified()
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<E>