Condividi tramite


CopyOnWriteArrayList.AddIfAbsent(Object) Method

Definition

Appends the element, if not present.

[Android.Runtime.Register("addIfAbsent", "(Ljava/lang/Object;)Z", "GetAddIfAbsent_Ljava_lang_Object_Handler")]
public virtual bool AddIfAbsent (Java.Lang.Object? e);
[<Android.Runtime.Register("addIfAbsent", "(Ljava/lang/Object;)Z", "GetAddIfAbsent_Ljava_lang_Object_Handler")>]
abstract member AddIfAbsent : Java.Lang.Object -> bool
override this.AddIfAbsent : Java.Lang.Object -> bool

Parameters

e
Object

element to be added to this list, if absent

Returns

true if the element was added

Attributes

Remarks

Appends the element, if not present.

Java documentation for java.util.concurrent.CopyOnWriteArrayList.addIfAbsent(E).

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