java.util
Class ConcurrentModificationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.util.ConcurrentModificationException

public class ConcurrentModificationException
extends RuntimeException

Exception that is thrown by the collections classes when it is detected that a modification has been made to a data structure when this is not allowed, such as when a collection is structurally modified while an Iterator is operating over it. In cases where this can be detected, a ConcurrentModificationException will be thrown. An Iterator that detects this condition is referred to as fail-fast. Notice that this can occur even in single-threaded designs, if you call methods out of order.

Since:
1.2
See Also:
Collection, Iterator, ListIterator, Vector, LinkedList, HashSet, Hashtable, TreeMap, AbstractList

Constructor Summary
ConcurrentModificationException()
          Constructs a ConcurrentModificationException with no detail message.
ConcurrentModificationException(String detail)
          Constructs a ConcurrentModificationException with a detail message.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
getCause, getLocalizedMessage, getMessage, initCause, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConcurrentModificationException

public ConcurrentModificationException()
Constructs a ConcurrentModificationException with no detail message.


ConcurrentModificationException

public ConcurrentModificationException(String detail)
Constructs a ConcurrentModificationException with a detail message.

Parameters:
detail - the detail message for the exception