Modifier and Type | Method and Description |
---|---|
static <V> AtomicReference<V> |
newReference()
Creates an
AtomicReference instance with no initial value. |
static <V> AtomicReference<V> |
newReference(V initialValue)
Creates an
AtomicReference instance with the given initial value. |
static <E> AtomicReferenceArray<E> |
newReferenceArray(E[] array)
Creates an
AtomicReferenceArray instance with the same length as,
and all elements copied from, the given array. |
static <E> AtomicReferenceArray<E> |
newReferenceArray(int length)
Creates an
AtomicReferenceArray instance 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-2014. All Rights Reserved.