1. /*
  2. * @(#)ConcurrentModificationException.java 1.7 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.util;
  8. /**
  9. * This exception may be thrown by methods that have detected concurrent
  10. * modification of a backing object when such modification is not permissible.
  11. * <p>
  12. * For example, it is not permssible for one thread to modify a Collection
  13. * while another thread is iterating over it. In general, the results of the
  14. * iteration are undefined under these circumstances. Some Iterator
  15. * implementations (including those of all the collection implementations
  16. * provided by the JDK) may choose to throw this exception if this behavior is
  17. * detected. Iterators that do this are known as <i>fail-fast</i> iterators,
  18. * as they fail quickly and cleanly, rather that risking arbitrary,
  19. * non-deterministic behavior at an undetermined time in the future.
  20. *
  21. * @author Josh Bloch
  22. * @version 1.7, 11/29/01
  23. * @see Collection
  24. * @see Iterator
  25. * @see ListIterator
  26. * @see Vector
  27. * @see LinkedList
  28. * @see HashSet
  29. * @see Hashtable
  30. * @see TreeMap
  31. * @see AbstractList
  32. * @since JDK1.2
  33. */
  34. public class ConcurrentModificationException extends RuntimeException {
  35. /**
  36. * Constructs a ConcurrentModificationException with no
  37. * detail message.
  38. */
  39. public ConcurrentModificationException() {
  40. }
  41. /**
  42. * Constructs a <tt>ConcurrentModificationException</tt> with the
  43. * specified detail message.
  44. */
  45. public ConcurrentModificationException(String message) {
  46. super(message);
  47. }
  48. }