Merge git+ssh://davetron5000@repo.or.cz/srv/git/vimdoclet
[vimdoclet.git] / sample / java.util.ConcurrentModificationException.txt
blob7a2f0705963ddb3e7160b10d0b77d00bc1e8275e
1 *java.util.ConcurrentModificationException* *ConcurrentModificationException* Th
3 public class ConcurrentModificationException
4   extends    |java.lang.RuntimeException|
6 |java.util.ConcurrentModificationException_Description|
7 |java.util.ConcurrentModificationException_Fields|
8 |java.util.ConcurrentModificationException_Constructors|
9 |java.util.ConcurrentModificationException_Methods|
11 ================================================================================
13 *java.util.ConcurrentModificationException_Constructors*
14 |java.util.ConcurrentModificationException()|Constructs a ConcurrentModificatio
15 |java.util.ConcurrentModificationException(String)|Constructs a ConcurrentModif
17 *java.util.ConcurrentModificationException_Description*
19 This exception may be thrown by methods that have detected concurrent 
20 modification of an object when such modification is not permissible. 
22 For example, it is not generally permissible for one thread to modify a 
23 Collection while another thread is iterating over it. In general, the results 
24 of the iteration are undefined under these circumstances. Some Iterator 
25 implementations (including those of all the general purpose collection 
26 implementations provided by the JRE) may choose to throw this exception if this 
27 behavior is detected. Iterators that do this are known as fail-fast iterators, 
28 as they fail quickly and cleanly, rather that risking arbitrary, 
29 non-deterministic behavior at an undetermined time in the future. 
31 Note that this exception does not always indicate that an object has been 
32 concurrently modified by a different thread. If a single thread issues a 
33 sequence of method invocations that violates the contract of an object, the 
34 object may throw this exception. For example, if a thread modifies a collection 
35 directly while it is iterating over the collection with a fail-fast iterator, 
36 the iterator will throw this exception. 
38 Note that fail-fast behavior cannot be guaranteed as it is, generally speaking, 
39 impossible to make any hard guarantees in the presence of unsynchronized 
40 concurrent modification. Fail-fast operations throw 
41 ConcurrentModificationException on a best-effort basis. Therefore, it would be 
42 wrong to write a program that depended on this exception for its correctness: 
43 ConcurrentModificationException should be used only to detect bugs. 
46 *java.util.ConcurrentModificationException()*
48 public ConcurrentModificationException()
50 Constructs a ConcurrentModificationException with no detail message. 
53 *java.util.ConcurrentModificationException(String)*
55 public ConcurrentModificationException(java.lang.String message)
57 Constructs a ConcurrentModificationException with the specified detail message. 
59     message - the detail message pertaining to this exception.