Merge git+ssh://davetron5000@repo.or.cz/srv/git/vimdoclet
[vimdoclet.git] / sample / java.util.concurrent.atomic.AtomicReferenceArray.txt
blob92e4d82b69b06f0ecd8d38fa2cdc54b07345d875
1 *java.util.concurrent.atomic.AtomicReferenceArray* *AtomicReferenceArray* An arr
3 public class AtomicReferenceArray
4   extends    |java.lang.Object|
5   implements |java.io.Serializable|
7 |java.util.concurrent.atomic.AtomicReferenceArray_Description|
8 |java.util.concurrent.atomic.AtomicReferenceArray_Fields|
9 |java.util.concurrent.atomic.AtomicReferenceArray_Constructors|
10 |java.util.concurrent.atomic.AtomicReferenceArray_Methods|
12 ================================================================================
14 *java.util.concurrent.atomic.AtomicReferenceArray_Constructors*
15 |java.util.concurrent.atomic.AtomicReferenceArray(E[])|Create a new AtomicRefer
16 |java.util.concurrent.atomic.AtomicReferenceArray(int)|Create a new AtomicRefer
18 *java.util.concurrent.atomic.AtomicReferenceArray_Methods*
19 |java.util.concurrent.atomic.AtomicReferenceArray.compareAndSet(int,E,E)|Atomic
20 |java.util.concurrent.atomic.AtomicReferenceArray.get(int)|Get the current valu
21 |java.util.concurrent.atomic.AtomicReferenceArray.getAndSet(int,E)|Set the elem
22 |java.util.concurrent.atomic.AtomicReferenceArray.length()|Returns the length o
23 |java.util.concurrent.atomic.AtomicReferenceArray.set(int,E)|Set the element at
24 |java.util.concurrent.atomic.AtomicReferenceArray.toString()|Returns the String
25 |java.util.concurrent.atomic.AtomicReferenceArray.weakCompareAndSet(int,E,E)|At
27 *java.util.concurrent.atomic.AtomicReferenceArray_Description*
29 An array of object references in which elements may be updated atomically. See 
30 the (|java.util.concurrent.atomic|) package specification for description of 
31 the properties of atomic variables. 
34 *java.util.concurrent.atomic.AtomicReferenceArray(E[])*
36 public AtomicReferenceArray(java.lang.Object[] array)
38 Create a new AtomicReferenceArray with the same length as, and all elements 
39 copied from, the given array. 
41     array - the array to copy elements from 
43 *java.util.concurrent.atomic.AtomicReferenceArray(int)*
45 public AtomicReferenceArray(int length)
47 Create a new AtomicReferenceArray of given length. 
49     length - the length of the array 
51 *java.util.concurrent.atomic.AtomicReferenceArray.compareAndSet(int,E,E)*
53 public final boolean compareAndSet(
54   int i,
55   java.lang.Object expect,
56   java.lang.Object update)
58 Atomically set the value to the given updated value if the current value == the 
59 expected value. 
61     i - the index 
62     expect - the expected value 
63     update - the new value 
65     Returns: true if successful. False return indicates that the actual value was not equal 
66              to the expected value. 
67 *java.util.concurrent.atomic.AtomicReferenceArray.get(int)*
69 public final |java.lang.Object| get(int i)
71 Get the current value at position i. 
73     i - the index 
75     Returns: the current value 
76 *java.util.concurrent.atomic.AtomicReferenceArray.getAndSet(int,E)*
78 public final |java.lang.Object| getAndSet(
79   int i,
80   java.lang.Object newValue)
82 Set the element at position i to the given value and return the old value. 
84     i - the index 
85     newValue - the new value 
87     Returns: the previous value 
88 *java.util.concurrent.atomic.AtomicReferenceArray.length()*
90 public final int length()
92 Returns the length of the array. 
95     Returns: the length of the array 
96 *java.util.concurrent.atomic.AtomicReferenceArray.set(int,E)*
98 public final void set(
99   int i,
100   java.lang.Object newValue)
102 Set the element at position i to the given value. 
104     i - the index 
105     newValue - the new value 
107 *java.util.concurrent.atomic.AtomicReferenceArray.toString()*
109 public |java.lang.String| toString()
111 Returns the String representation of the current values of array. 
114     Returns: the String representation of the current values of array. 
115 *java.util.concurrent.atomic.AtomicReferenceArray.weakCompareAndSet(int,E,E)*
117 public final boolean weakCompareAndSet(
118   int i,
119   java.lang.Object expect,
120   java.lang.Object update)
122 Atomically set the value to the given updated value if the current value == the 
123 expected value. May fail spuriously. 
125     i - the index 
126     expect - the expected value 
127     update - the new value 
129     Returns: true if successful.