AtomicIntegerFieldUpdater.AddAndGet(Object, Int32) Method

Definition

Atomically adds the given value to the current value of the field of the given object managed by this updater.

[Android.Runtime.Register("addAndGet", "(Ljava/lang/Object;I)I", "GetAddAndGet_Ljava_lang_Object_IHandler")]
public virtual int AddAndGet (Java.Lang.Object? obj, int delta);
[<Android.Runtime.Register("addAndGet", "(Ljava/lang/Object;I)I", "GetAddAndGet_Ljava_lang_Object_IHandler")>]
abstract member AddAndGet : Java.Lang.Object * int -> int
override this.AddAndGet : Java.Lang.Object * int -> int

Parameters

obj
Object

An object whose field to get and set

delta
Int32

the value to add

Returns

the updated value

Attributes

Remarks

Atomically adds the given value to the current value of the field of the given object managed by this updater.

Java documentation for java.util.concurrent.atomic.AtomicIntegerFieldUpdater.addAndGet(T, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to