public class AtomicCompareAndSet
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
lazyInitObjectReference(java.lang.Object o,
java.lang.String fieldName,
java.lang.Object initialValue)
uses the Unsafe API to atomically initialize a field which might be null with the given value,
returning the non-null value which was set already or just now.
|
public static final java.lang.Object lazyInitObjectReference(java.lang.Object o,
java.lang.String fieldName,
java.lang.Object initialValue)
o - object containing the fieldfieldName - the name of the field to be initializedinitialValue - the value to set if and only if the field 'fieldname' within the object 'o' was nullCopyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.