@GwtIncompatible public final class Atomics extends Object
java.util.concurrent.atomic package.| Modifier and Type | Method and Description | 
|---|---|
| static <V> AtomicReference<V> | newReference()Creates an  AtomicReferenceinstance with no initial value. | 
| static <V> AtomicReference<V> | newReference(V initialValue)Creates an  AtomicReferenceinstance with the given initial value. | 
| static <E> AtomicReferenceArray<E> | newReferenceArray(E[] array)Creates an  AtomicReferenceArrayinstance with the same length as, and all elements
 copied from, the given array. | 
| static <E> AtomicReferenceArray<E> | newReferenceArray(int length)Creates an  AtomicReferenceArrayinstance of given length. | 
public static <V> AtomicReference<V> newReference()
AtomicReference instance with no initial value.AtomicReference with no initial valuepublic static <V> AtomicReference<V> newReference(@Nullable V initialValue)
AtomicReference instance with the given initial value.initialValue - the initial valueAtomicReference with the given initial valuepublic static <E> AtomicReferenceArray<E> newReferenceArray(int length)
AtomicReferenceArray instance of given length.length - the length of the arrayAtomicReferenceArray with the given lengthpublic static <E> AtomicReferenceArray<E> newReferenceArray(E[] array)
AtomicReferenceArray instance with the same length as, and all elements
 copied from, the given array.array - the array to copy elements fromAtomicReferenceArray copied from the given arrayCopyright © 2010–2017. All rights reserved.