Condividi tramite


IListIterator.Add(Object) Method

Definition

Inserts the specified element into the list (optional operation).

[Android.Runtime.Register("add", "(Ljava/lang/Object;)V", "GetAdd_Ljava_lang_Object_Handler:Java.Util.IListIteratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Add (Java.Lang.Object? e);
[<Android.Runtime.Register("add", "(Ljava/lang/Object;)V", "GetAdd_Ljava_lang_Object_Handler:Java.Util.IListIteratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Add : Java.Lang.Object -> unit

Parameters

e
Object

the element to insert

Attributes

Remarks

Inserts the specified element into the list (optional operation). The element is inserted immediately before the element that would be returned by #next, if any, and after the element that would be returned by #previous, if any. (If the list contains no elements, the new element becomes the sole element on the list.) The new element is inserted before the implicit cursor: a subsequent call to next would be unaffected, and a subsequent call to previous would return the new element. (This call increases by one the value that would be returned by a call to nextIndex or previousIndex.)

Java documentation for java.util.ListIterator.add(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