Package com.ibm.icu.impl
Class Trie2.CharSequenceIterator
- java.lang.Object
-
- com.ibm.icu.impl.Trie2.CharSequenceIterator
-
- All Implemented Interfaces:
java.util.Iterator<Trie2.CharSequenceValues>
- Enclosing class:
- Trie2
public class Trie2.CharSequenceIterator extends java.lang.Object implements java.util.Iterator<Trie2.CharSequenceValues>
An iterator that operates over an input CharSequence, and for each Unicode code point in the input returns the associated value from the Trie2. The iterator can move forwards or backwards, and can be reset to an arbitrary index. Note that Trie2_16 and Trie2_32 subclass Trie2.CharSequenceIterator. This is done only for performance reasons. It does require that any changes made here be propagated into the corresponding code in the subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description private Trie2.CharSequenceValues
fResults
private int
index
private java.lang.CharSequence
text
private int
textLength
-
Constructor Summary
Constructors Constructor Description CharSequenceIterator(java.lang.CharSequence t, int index)
Internal constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
boolean
hasPrevious()
Trie2.CharSequenceValues
next()
Trie2.CharSequenceValues
previous()
void
remove()
Iterator.remove() is not supported by Trie2.CharSequenceIterator.void
set(int i)
-
-
-
Field Detail
-
text
private java.lang.CharSequence text
-
textLength
private int textLength
-
index
private int index
-
fResults
private Trie2.CharSequenceValues fResults
-
-
Method Detail
-
set
public void set(int i)
-
hasNext
public final boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<Trie2.CharSequenceValues>
-
hasPrevious
public final boolean hasPrevious()
-
next
public Trie2.CharSequenceValues next()
- Specified by:
next
in interfacejava.util.Iterator<Trie2.CharSequenceValues>
-
previous
public Trie2.CharSequenceValues previous()
-
remove
public void remove()
Iterator.remove() is not supported by Trie2.CharSequenceIterator.- Specified by:
remove
in interfacejava.util.Iterator<Trie2.CharSequenceValues>
- Throws:
java.lang.UnsupportedOperationException
- Always thrown because this operation is not supported- See Also:
Iterator.remove()
-
-