home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / util / ConcurrentModificationException.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  2.0 KB  |  61 lines

  1. /*
  2.  * @(#)ConcurrentModificationException.java    1.3 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.util;
  16.  
  17. /**
  18.  * This exception may be thrown by methods that have detected concurrent
  19.  * modification of a backing object when such modification is not permissible.
  20.  * <p>
  21.  * For example, it is not permssible for one thread to modify a Collection
  22.  * while another thread is iterating over it.  In general, the results of the
  23.  * iteration are undefined under these circumstances.  Some Iterator
  24.  * implementations (including those of all the collection implementations
  25.  * provided by the JDK) may choose to throw this exception if this behavior is
  26.  * detected.  Iterators that do this are known as <em>fail-fast</em>
  27.  * iterators, as they fail quickly and cleanly, rather that risking arbitrary,
  28.  * non-deterministic behavior at an undetermined time in the future.
  29.  *
  30.  * @author  Josh Bloch
  31.  * @version 1.3, 03/18/98
  32.  * @see        Collection
  33.  * @see     Iterator
  34.  * @see     ListIterator
  35.  * @see        Vector
  36.  * @see        LinkedList
  37.  * @see        HashSet
  38.  * @see        ArraySet
  39.  * @see        Hashtable
  40.  * @see        TreeMap
  41.  * @see        ArrayMap
  42.  * @see        AbstractList
  43.  * @since   JDK1.2
  44.  */
  45. public class ConcurrentModificationException extends RuntimeException {
  46.     /**
  47.      * Constructs a ConcurrentModificationException with no
  48.      * detail message.
  49.      */
  50.     public ConcurrentModificationException() {
  51.     }
  52.  
  53.     /**
  54.      * Constructs a <code>ConcurrentModificationException</code> with the
  55.      * specified detail message.
  56.      */
  57.     public ConcurrentModificationException(String message) {
  58.     super(message);
  59.     }
  60. }
  61.