Share via


CopyOnWriteArraySet.Iterator Method

Definition

Returns an iterator over the elements contained in this set in the order in which these elements were added.

[Android.Runtime.Register("iterator", "()Ljava/util/Iterator;", "GetIteratorHandler")]
public override Java.Util.IIterator? Iterator ();
[<Android.Runtime.Register("iterator", "()Ljava/util/Iterator;", "GetIteratorHandler")>]
override this.Iterator : unit -> Java.Util.IIterator

Returns

an iterator over the elements in this set

Attributes

Remarks

Returns an iterator over the elements contained in this set in the order in which these elements were added.

The returned iterator provides a snapshot of the state of the set when the iterator was constructed. No synchronization is needed while traversing the iterator. The iterator does <em>NOT</em> support the remove method.

Java documentation for java.util.concurrent.CopyOnWriteArraySet.iterator().

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