public class AtomicReferences
extends java.lang.Object
Constructor and Description |
---|
AtomicReferences() |
Modifier and Type | Method and Description |
---|---|
static boolean |
setIfDifferent(java.util.concurrent.atomic.AtomicBoolean ref,
boolean value)
sets the atomic reference to the given value, and returns whether there is any change
|
static <T> boolean |
setIfDifferent(java.util.concurrent.atomic.AtomicReference<T> ref,
T value)
sets the atomic reference to the given value, and returns whether there is any change
|
static <T> com.google.common.base.Supplier<T> |
supplier(java.util.concurrent.atomic.AtomicReference<T> ref)
returns the given atomic as a Supplier
|
public static boolean setIfDifferent(java.util.concurrent.atomic.AtomicBoolean ref, boolean value)
public static <T> boolean setIfDifferent(java.util.concurrent.atomic.AtomicReference<T> ref, T value)
public static <T> com.google.common.base.Supplier<T> supplier(java.util.concurrent.atomic.AtomicReference<T> ref)