Compartilhar via


AtomicIntegerFieldUpdater.GetAndIncrement(Object) Method

Definition

Atomically increments by one the current value of the field of the given object managed by this updater.

[Android.Runtime.Register("getAndIncrement", "(Ljava/lang/Object;)I", "GetGetAndIncrement_Ljava_lang_Object_Handler")]
public virtual int GetAndIncrement (Java.Lang.Object? obj);
[<Android.Runtime.Register("getAndIncrement", "(Ljava/lang/Object;)I", "GetGetAndIncrement_Ljava_lang_Object_Handler")>]
abstract member GetAndIncrement : Java.Lang.Object -> int
override this.GetAndIncrement : Java.Lang.Object -> int

Parameters

obj
Object

An object whose field to get and set

Returns

the previous value

Attributes

Remarks

Atomically increments by one the current value of the field of the given object managed by this updater.

Java documentation for java.util.concurrent.atomic.AtomicIntegerFieldUpdater.getAndIncrement(T).

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