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 /* 27 ******************************************************************************* 28 * (C) Copyright IBM Corp. 1996-2005 - All Rights Reserved * 29 * * 30 * The original version of this source code and documentation is copyrighted * 31 * and owned by IBM, These materials are provided under terms of a License * 32 * Agreement between IBM and Sun. This technology is protected by multiple * 33 * US and International patents. This notice and attribution to IBM may not * 34 * to removed. * 35 ******************************************************************************* 36 */ 37 38 package sun.text.normalizer; 39 40 /** 41 * <p>Interface for enabling iteration over sets of <int index, int value>, 42 * where index is the sorted integer index in ascending order and value, its 43 * associated integer value.</p> 44 * <p>The result for each iteration is the consecutive range of 45 * <int index, int value> with the same value. Result is represented by 46 * <start, limit, value> where</p> 47 * <ul> 48 * <li> start is the starting integer of the result range 49 * <li> limit is 1 after the maximum integer that follows start, such that 50 * all integers between start and (limit - 1), inclusive, have the same 51 * associated integer value. 52 * <li> value is the integer value that all integers from start to (limit - 1) 53 * share in common. 54 * </ul> 55 * <p> 56 * Hence value(start) = value(start + 1) = .... = value(start + n) = .... = 57 * value(limit - 1). However value(start -1) != value(start) and 58 * value(limit) != value(start). 59 * </p> 60 * <p>Most implementations will be created by factory methods, such as the 61 * character type iterator in UCharacter.getTypeIterator. See example below. 62 * </p> 63 * Example of use:<br> 64 * <pre> 65 * RangeValueIterator iterator = UCharacter.getTypeIterator(); 66 * RangeValueIterator.Element result = new RangeValueIterator.Element(); 67 * while (iterator.next(result)) { 68 * System.out.println("Codepoint \\u" + 69 * Integer.toHexString(result.start) + 70 * " to codepoint \\u" + 71 * Integer.toHexString(result.limit - 1) + 72 * " has the character type " + result.value); 73 * } 74 * </pre> 75 * @author synwee 76 * @stable ICU 2.6 77 */ 78 public interface RangeValueIterator 79 { 80 // public inner class --------------------------------------------- 81 82 /** | 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 /* 27 ******************************************************************************* 28 * (C) Copyright IBM Corp. 1996-2005 - All Rights Reserved * 29 * * 30 * The original version of this source code and documentation is copyrighted * 31 * and owned by IBM, These materials are provided under terms of a License * 32 * Agreement between IBM and Sun. This technology is protected by multiple * 33 * US and International patents. This notice and attribution to IBM may not * 34 * to removed. * 35 ******************************************************************************* 36 */ 37 38 package sun.text.normalizer; 39 40 /** 41 * <p>Interface for enabling iteration over sets of 42 * {@code <int index, int value>}, 43 * where index is the sorted integer index in ascending order and value, its 44 * associated integer value. 45 * <p>The result for each iteration is the consecutive range of 46 * {@code <int index, int value>} with the same value. Result is represented by 47 * {@code <start, limit, value>} where 48 * <ul> 49 * <li> start is the starting integer of the result range 50 * <li> limit is 1 after the maximum integer that follows start, such that 51 * all integers between start and (limit - 1), inclusive, have the same 52 * associated integer value. 53 * <li> value is the integer value that all integers from start to (limit - 1) 54 * share in common. 55 * </ul> 56 * <p> 57 * Hence value(start) = value(start + 1) = .... = value(start + n) = .... = 58 * value(limit - 1). However value(start -1) != value(start) and 59 * value(limit) != value(start). 60 * 61 * <p>Most implementations will be created by factory methods, such as the 62 * character type iterator in UCharacter.getTypeIterator. See example below. 63 * 64 * Example of use:<br> 65 * <pre> 66 * RangeValueIterator iterator = UCharacter.getTypeIterator(); 67 * RangeValueIterator.Element result = new RangeValueIterator.Element(); 68 * while (iterator.next(result)) { 69 * System.out.println("Codepoint \\u" + 70 * Integer.toHexString(result.start) + 71 * " to codepoint \\u" + 72 * Integer.toHexString(result.limit - 1) + 73 * " has the character type " + result.value); 74 * } 75 * </pre> 76 * @author synwee 77 * @stable ICU 2.6 78 */ 79 public interface RangeValueIterator 80 { 81 // public inner class --------------------------------------------- 82 83 /** |