| java.lang.Object com.ibm.icu.lang.UCharacterNameIterator
UCharacterNameIterator | class UCharacterNameIterator implements ValueIterator(Code) | | Class enabling iteration of the codepoints and their names.
Result of each iteration contains a valid codepoint that has valid
name.
See UCharacter.getNameIterator() for an example of use.
author: synwee since: release 2.1, March 5 2002 |
Method Summary | |
public boolean | next(ValueIterator.Element element) | public void | reset() Resets the iterator to start iterating from the integer index
UCharacter.MIN_VALUE or X if a setRange(X, Y) has been called previously. | public void | setRange(int start, int limit) Restricts the range of integers to iterate and resets the iteration
to begin at the index argument start.
If setRange(start, end) is not performed before next(element) is
called, the iteration will start from the integer index
UCharacter.MIN_VALUE and end at UCharacter.MAX_VALUE.
If this range is set outside the range of UCharacter.MIN_VALUE and
UCharacter.MAX_VALUE, next(element) will always return false.
Parameters: start - first integer in range to iterate Parameters: limit - 1 integer after the last integer in range exception: IllegalArgumentException - thrown when attempting to set anillegal range. |
UCharacterNameIterator | protected UCharacterNameIterator(UCharacterName name, int choice)(Code) | | Constructor
Parameters: name - name data Parameters: choice - name choice from the classcom.ibm.icu.lang.UCharacterNameChoice |
next | public boolean next(ValueIterator.Element element)(Code) | | Gets the next result for this iteration and returns
true if we are not at the end of the iteration, false otherwise.
If the return boolean is a false, the contents of elements will not
be updated.
Parameters: element - for storing the result codepoint and name true if we are not at the end of the iteration, false otherwise. See Also: Element |
reset | public void reset()(Code) | | Resets the iterator to start iterating from the integer index
UCharacter.MIN_VALUE or X if a setRange(X, Y) has been called previously.
|
setRange | public void setRange(int start, int limit)(Code) | | Restricts the range of integers to iterate and resets the iteration
to begin at the index argument start.
If setRange(start, end) is not performed before next(element) is
called, the iteration will start from the integer index
UCharacter.MIN_VALUE and end at UCharacter.MAX_VALUE.
If this range is set outside the range of UCharacter.MIN_VALUE and
UCharacter.MAX_VALUE, next(element) will always return false.
Parameters: start - first integer in range to iterate Parameters: limit - 1 integer after the last integer in range exception: IllegalArgumentException - thrown when attempting to set anillegal range. E.g limit <= start |
|
|