Lines Matching refs:Range

82  * enum-based ones, such as {@link NumericShaper.Range#ARABIC}.
88 * or creating a {@code Set} with the {@link NumericShaper.Range}
91 * EnumSet.of(NumericShaper.Scirpt.ARABIC, NumericShaper.Range.TAMIL)
97 * mapping is possible, such as {@code NumericShaper.Range.ARABIC}
99 * values are specified, such as {@code NumericShaper.Range.BALINESE},
110 * <th class="TableHeadingColor">Unicode Range</th>
121 * <td>{@link NumericShaper.Range#ARABIC}<br>
122 * {@link NumericShaper.Range#EASTERN_ARABIC}</td>
123 * <td>{@link NumericShaper.Range#EASTERN_ARABIC}</td>
127 * <td>{@link NumericShaper.Range#TAI_THAM_HORA}<br>
128 * {@link NumericShaper.Range#TAI_THAM_THAM}</td>
129 * <td>{@link NumericShaper.Range#TAI_THAM_THAM}</td>
138 * A {@code NumericShaper.Range} represents a Unicode range of a
140 * NumericShaper.Range#THAI} range has the Thai digits, THAI DIGIT
143 * <p>The <code>Range</code> enum replaces the traditional bit
155 * NumericShaper.Range.ARABIC,
156 * NumericShaper.Range.TAMIL),
157 * NumericShaper.Range.EUROPEAN);
162 public static enum Range {
314 private static int toRangeIndex(Range script) {
319 private static Range indexToRange(int index) {
320 return index < NUM_KEYS ? Range.values()[index] : null;
323 private static int toRangeMask(Set<Range> ranges) {
325 for (Range range : ranges) {
334 private static Set<Range> maskToRangeSet(int mask) {
335 Set<Range> set = EnumSet.noneOf(Range.class);
336 Range[] a = Range.values();
351 private Range(int base, int start, int end) {
379 * The context {@code Range} for contextual shaping or the {@code
380 * Range} for non-contextual shaping. {@code null} for the bit
385 private Range shapingRange;
388 * {@code Set<Range>} indicating which Unicode ranges to
391 private transient Set<Range> rangeSet;
394 * rangeSet.toArray() value. Sorted by Range.base when the number
397 private transient Range[] rangeArray;
469 * ranges. Use {@code EmunSet.allOf(NumericShaper.Range.class)} to
563 // cache for the NumericShaper.Range version
564 private transient volatile Range currentRange = Range.EUROPEAN;
566 private Range rangeForCodePoint(final int codepoint) {
571 final Range[] ranges = rangeArray;
577 Range range = ranges[mid];
594 return Range.EUROPEAN;
936 * NumericShaper.Range} constant.
941 public static NumericShaper getShaper(Range singleRange) {
980 public static NumericShaper getContextualShaper(Set<Range> ranges) {
981 NumericShaper shaper = new NumericShaper(Range.EUROPEAN, ranges);
1016 * {@code NumericShaper.Range.EUROPEAN}
1022 public static NumericShaper getContextualShaper(Set<Range> ranges,
1023 Range defaultContext) {
1040 private NumericShaper(Range defaultContext, Set<Range> ranges) {
1046 if (rangeSet.contains(Range.EASTERN_ARABIC)
1047 && rangeSet.contains(Range.ARABIC)) {
1048 rangeSet.remove(Range.ARABIC);
1053 if (rangeSet.contains(Range.TAI_THAM_THAM)
1054 && rangeSet.contains(Range.TAI_THAM_HORA)) {
1055 rangeSet.remove(Range.TAI_THAM_HORA);
1058 rangeArray = rangeSet.toArray(new Range[rangeSet.size()]);
1062 new Comparator<Range>() {
1063 public int compare(Range s1, Range s2) {
1120 shapeContextually(text, start, count, Range.values()[ctxKey]);
1138 * such as {@code NumericShaper.Range.EUROPEAN}
1145 public void shape(char[] text, int start, int count, Range context) {
1155 int key = Range.toRangeIndex(context);
1216 public Set<Range> getRangeSet() {
1220 return Range.maskToRangeSet(mask);
1295 private void shapeContextually(char[] text, int start, int count, Range ctxKey) {
1298 ctxKey = Range.EUROPEAN;
1301 Range lastKey = ctxKey;
1346 * NumericShaper ns2 = NumericShaper.getShaper(NumericShaper.Range.ARABIC);
1368 && rangeSet.equals(Range.maskToRangeSet(rhs.mask))
1369 && shapingRange == Range.indexToRange(rhs.key);
1371 Set<Range> rset = Range.maskToRangeSet(mask);
1372 Range srange = Range.indexToRange(key);
1398 buf.append(shapingRange == null ? Range.values()[key] : shapingRange);
1411 buf.append(Range.values()[i]);
1486 * Converts the {@code NumericShaper.Range} enum-based parameters,
1497 int index = Range.toRangeIndex(shapingRange);
1503 mask |= Range.toRangeMask(rangeSet);