Package com.ibm.icu.util
Class CharsTrie.Iterator
- java.lang.Object
-
- com.ibm.icu.util.CharsTrie.Iterator
-
- All Implemented Interfaces:
Iterator<CharsTrie.Entry>
- Enclosing class:
- CharsTrie
public static final class CharsTrie.Iterator extends Object implements Iterator<CharsTrie.Entry>
Iterator for all of the (string, value) pairs in a CharsTrie.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Returns true if there is at least one more element, false otherwise.CharsTrie.Entrynext()Finds the next (string, value) pair if there is one.voidremove()Iterator.remove() is not supported.CharsTrie.Iteratorreset()Resets this iterator to its initial state.
-
-
-
Method Detail
-
reset
public CharsTrie.Iterator reset()
Resets this iterator to its initial state.- Returns:
- this
-
hasNext
public boolean hasNext()
Description copied from interface:IteratorReturns true if there is at least one more element, false otherwise.- Specified by:
hasNextin interfaceIterator<CharsTrie.Entry>- Returns:
- true if there are more elements.
- See Also:
Iterator.next()
-
next
public CharsTrie.Entry next()
Finds the next (string, value) pair if there is one. If the string is truncated to the maximum length and does not have a real value, then the value is set to -1. In this case, this "not a real value" is indistinguishable from a real value of -1.- Specified by:
nextin interfaceIterator<CharsTrie.Entry>- Returns:
- An Entry with the string and value of the next element.
- Throws:
NoSuchElementException- - iteration has no more elements.- See Also:
Iterator.hasNext()
-
remove
public void remove()
Iterator.remove() is not supported.- Specified by:
removein interfaceIterator<CharsTrie.Entry>- Throws:
UnsupportedOperationException- (always)
-
-