Interface for enabling iteration over sets of <int, Object>, where int is the sorted integer index in ascending order, and Object its associated value.
The ValueIterator allows iterations over integer indexes in the range of Integer.MIN_VALUE to Integer.MAX_VALUE inclusive. Implementations of ValueIterator should specify their own maximum subrange within the above range that is meaningful to its applications.
Most implementations will be created by factory methods, such as the character name iterator in UCharacter.getNameIterator. See example below.
Example of use:ValueIterator iterator = UCharacter.getNameIterator(); ValueIterator.Element result = new ValueIterator.Element(); iterator.setRange(UCharacter.MIN_VALUE, UCharacter.MAX_VALUE); while (iterator.next(result)) { System.out.println("Codepoint \\u" + Integer.toHexString(result.integer) + " has the character name " + (String) result.value); }@author synwee @stable ICU 2.6
Interface for interating through Expressions or values. It may return instances of Expression (which then have to be evaluated) or it may return some Object constant value - this should be checked for after calling {@link #next next}
This interface is meant to abstract the details of how the values are stored and retrieved, if they are even stored in memory or not, etc. etc. An implementation instance may or may not be resettable and therefore reusable - see {@link #reset reset}.
|
|
|
|
|
|