< prev index next >

src/java.base/share/classes/java/util/ConcurrentModificationException.java

Print this page




  51  * unsynchronized concurrent modification.  Fail-fast operations
  52  * throw {@code ConcurrentModificationException} on a best-effort basis.
  53  * Therefore, it would be wrong to write a program that depended on this
  54  * exception for its correctness: <i>{@code ConcurrentModificationException}
  55  * should be used only to detect bugs.</i>
  56  *
  57  * @author  Josh Bloch
  58  * @see     Collection
  59  * @see     Iterator
  60  * @see     Spliterator
  61  * @see     ListIterator
  62  * @see     Vector
  63  * @see     LinkedList
  64  * @see     HashSet
  65  * @see     Hashtable
  66  * @see     TreeMap
  67  * @see     AbstractList
  68  * @since   1.2
  69  */
  70 public class ConcurrentModificationException extends RuntimeException {

  71     private static final long serialVersionUID = -3666751008965953603L;
  72 
  73     /**
  74      * Constructs a ConcurrentModificationException with no
  75      * detail message.
  76      */
  77     public ConcurrentModificationException() {
  78     }
  79 
  80     /**
  81      * Constructs a {@code ConcurrentModificationException} with the
  82      * specified detail message.
  83      *
  84      * @param message the detail message pertaining to this exception.
  85      */
  86     public ConcurrentModificationException(String message) {
  87         super(message);
  88     }
  89 
  90     /**




  51  * unsynchronized concurrent modification.  Fail-fast operations
  52  * throw {@code ConcurrentModificationException} on a best-effort basis.
  53  * Therefore, it would be wrong to write a program that depended on this
  54  * exception for its correctness: <i>{@code ConcurrentModificationException}
  55  * should be used only to detect bugs.</i>
  56  *
  57  * @author  Josh Bloch
  58  * @see     Collection
  59  * @see     Iterator
  60  * @see     Spliterator
  61  * @see     ListIterator
  62  * @see     Vector
  63  * @see     LinkedList
  64  * @see     HashSet
  65  * @see     Hashtable
  66  * @see     TreeMap
  67  * @see     AbstractList
  68  * @since   1.2
  69  */
  70 public class ConcurrentModificationException extends RuntimeException {
  71     @java.io.Serial
  72     private static final long serialVersionUID = -3666751008965953603L;
  73 
  74     /**
  75      * Constructs a ConcurrentModificationException with no
  76      * detail message.
  77      */
  78     public ConcurrentModificationException() {
  79     }
  80 
  81     /**
  82      * Constructs a {@code ConcurrentModificationException} with the
  83      * specified detail message.
  84      *
  85      * @param message the detail message pertaining to this exception.
  86      */
  87     public ConcurrentModificationException(String message) {
  88         super(message);
  89     }
  90 
  91     /**


< prev index next >