Share via


CollationElementIterator.Next Method

Definition

Get the next collation element in the string.

[Android.Runtime.Register("next", "()I", "")]
public int Next ();
[<Android.Runtime.Register("next", "()I", "")>]
member this.Next : unit -> int

Returns

the next collation element

Attributes

Remarks

Get the next collation element in the string.

This iterator iterates over a sequence of collation elements that were built from the string. Because there isn't necessarily a one-to-one mapping from characters to collation elements, this doesn't mean the same thing as "return the collation element [or ordering priority] of the next character in the string".

This function returns the collation element that the iterator is currently pointing to and then updates the internal pointer to point to the next element. previous() updates the pointer first and then returns the element. This means that when you change direction while iterating (i.e., call next() and then call previous(), or call previous() and then call next()), you'll get back the same element twice.

Java documentation for java.text.CollationElementIterator.next().

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