Collections.EmptyListIterator Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a list iterator that has no elements.
[Android.Runtime.Register("emptyListIterator", "()Ljava/util/ListIterator;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Util.IListIterator EmptyListIterator ();
[<Android.Runtime.Register("emptyListIterator", "()Ljava/util/ListIterator;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member EmptyListIterator : unit -> Java.Util.IListIterator
Returns
an empty list iterator
- Attributes
Remarks
Returns a list iterator that has no elements. More precisely,
<ul> <li>Iterator#hasNext hasNext
and ListIterator#hasPrevious hasPrevious
always return false
.</li> <li>Iterator#next next
and ListIterator#previous previous
always throw NoSuchElementException
.</li> <li>Iterator#remove remove
and ListIterator#set set
always throw IllegalStateException
.</li> <li>ListIterator#add add
always throws UnsupportedOperationException
.</li> <li>ListIterator#nextIndex nextIndex
always returns 0
.</li> <li>ListIterator#previousIndex previousIndex
always returns -1
.</li> </ul>
Implementations of this method are permitted, but not required, to return the same object from multiple invocations.
Added in 1.7.
Java documentation for java.util.Collections.emptyListIterator()
.
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.