21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package sun.text; 27 28 import sun.text.normalizer.NormalizerBase; 29 import sun.text.normalizer.NormalizerImpl; 30 31 public final class ComposedCharIter { 32 /** 33 * Constant that indicates the iteration has completed. 34 * {@link #next} returns this value when there are no more composed characters 35 * over which to iterate. 36 */ 37 public static final int DONE = NormalizerBase.DONE; 38 39 //cache the decomps mapping, so the seconde composedcharIter does 40 //not need to get the data again. 41 private static int chars[]; 42 private static String decomps[]; 43 private static int decompNum; 44 45 static { 46 int maxNum = 2100; 47 chars = new int[maxNum]; 48 decomps = new String[maxNum]; 49 decompNum = NormalizerImpl.getDecompose(chars, decomps); 50 } 51 52 /** 53 * Construct a new {@code ComposedCharIter}. The iterator will return 54 * all Unicode characters with canonical decompositions, excluding Korean 55 * Hangul characters. 56 */ 57 public ComposedCharIter() { } 58 59 /** 60 * Returns the next precomposed Unicode character. 61 * Repeated calls to {@code next} return all of the precomposed characters defined 62 * by Unicode, in ascending order. After all precomposed characters have | 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package sun.text; 27 28 import sun.text.normalizer.NormalizerBase; 29 import sun.text.normalizer.NormalizerImpl; 30 31 public final class ComposedCharIter { 32 /** 33 * Constant that indicates the iteration has completed. 34 * {@link #next} returns this value when there are no more composed characters 35 * over which to iterate. 36 */ 37 public static final int DONE = NormalizerBase.DONE; 38 39 //cache the decomps mapping, so the seconde composedcharIter does 40 //not need to get the data again. 41 private static int[] chars; 42 private static String[] decomps; 43 private static int decompNum; 44 45 static { 46 int maxNum = 2100; 47 chars = new int[maxNum]; 48 decomps = new String[maxNum]; 49 decompNum = NormalizerImpl.getDecompose(chars, decomps); 50 } 51 52 /** 53 * Construct a new {@code ComposedCharIter}. The iterator will return 54 * all Unicode characters with canonical decompositions, excluding Korean 55 * Hangul characters. 56 */ 57 public ComposedCharIter() { } 58 59 /** 60 * Returns the next precomposed Unicode character. 61 * Repeated calls to {@code next} return all of the precomposed characters defined 62 * by Unicode, in ascending order. After all precomposed characters have |