javadoc.com.google.common.util.concurrent.Atomics.html Maven / Gradle / Ivy
The newest version!
Atomics (Guava: Google Core Libraries for Java 11.0.1 API)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
com.google.common.util.concurrent
Class Atomics
java.lang.Object
com.google.common.util.concurrent.Atomics
Static utility methods pertaining to classes in the
java.util.concurrent.atomic
package.
- Since:
- 10.0
- Author:
- Kurt Alfred Kluever
Method Summary | ||
---|---|---|
static
|
newReference()
Creates an AtomicReference instance with no initial value. |
|
static
|
newReference(V initialValue)
Creates an AtomicReference instance with the given initial value. |
|
static
|
newReferenceArray(E[] array)
Creates an AtomicReferenceArray instance with the same length as,
and all elements copied from, the given array. |
|
static
|
newReferenceArray(int length)
Creates an AtomicReferenceArray instance of given length. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
newReference
public static <V> AtomicReference<V> newReference()
- Creates an
AtomicReference
instance with no initial value.- Returns:
- a new
AtomicReference
with no initial value
newReference
public static <V> AtomicReference<V> newReference(@Nullable V initialValue)
- Creates an
AtomicReference
instance with the given initial value.- Parameters:
initialValue
- the initial value- Returns:
- a new
AtomicReference
with the given initial value
newReferenceArray
public static <E> AtomicReferenceArray<E> newReferenceArray(int length)
- Creates an
AtomicReferenceArray
instance of given length.- Parameters:
length
- the length of the array- Returns:
- a new
AtomicReferenceArray
with the given length
newReferenceArray
public static <E> AtomicReferenceArray<E> newReferenceArray(E[] array)
- Creates an
AtomicReferenceArray
instance with the same length as, and all elements copied from, the given array.- Parameters:
array
- the array to copy elements from- Returns:
- a new
AtomicReferenceArray
copied from the given array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010-2012. All Rights Reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy