Lines Matching defs:Range

83  * enum-based ones, such as {@link NumericShaper.Range#ARABIC}.
89 * or creating a {@code Set} with the {@link NumericShaper.Range}
92 * EnumSet.of(NumericShaper.Range.ARABIC, NumericShaper.Range.TAMIL)
98 * mapping is possible, such as {@code NumericShaper.Range.ARABIC}
100 * values are specified, such as {@code NumericShaper.Range.BALINESE},
113 * <th class="TableHeadingColor">Unicode Range</th>
126 * <td>{@link NumericShaper.Range#ARABIC}<br>
127 * {@link NumericShaper.Range#EASTERN_ARABIC}</td>
128 * <td>{@link NumericShaper.Range#EASTERN_ARABIC}</td>
134 * <td>{@link NumericShaper.Range#TAI_THAM_HORA}<br>
135 * {@link NumericShaper.Range#TAI_THAM_THAM}</td>
136 * <td>{@link NumericShaper.Range#TAI_THAM_THAM}</td>
154 * A {@code NumericShaper.Range} represents a Unicode range of a
156 * NumericShaper.Range#THAI} range has the Thai digits, THAI DIGIT
159 * <p>The {@code Range} enum replaces the traditional bit
171 * NumericShaper.Range.ARABIC,
172 * NumericShaper.Range.TAMIL),
173 * NumericShaper.Range.EUROPEAN);
178 public static enum Range {
340 private static int toRangeIndex(Range script) {
345 private static Range indexToRange(int index) {
346 return index < NUM_KEYS ? Range.values()[index] : null;
349 private static int toRangeMask(Set<Range> ranges) {
351 for (Range range : ranges) {
360 private static Set<Range> maskToRangeSet(int mask) {
361 Set<Range> set = EnumSet.noneOf(Range.class);
362 Range[] a = Range.values();
377 private Range(int base, int start, int end) {
405 * The context {@code Range} for contextual shaping or the {@code
406 * Range} for non-contextual shaping. {@code null} for the bit
411 private Range shapingRange;
414 * {@code Set<Range>} indicating which Unicode ranges to
417 private transient Set<Range> rangeSet;
420 * rangeSet.toArray() value. Sorted by Range.base when the number
423 private transient Range[] rangeArray;
495 * ranges. Use {@code EnumSet.allOf(NumericShaper.Range.class)} to
589 // cache for the NumericShaper.Range version
590 private transient volatile Range currentRange = Range.EUROPEAN;
592 private Range rangeForCodePoint(final int codepoint) {
597 final Range[] ranges = rangeArray;
603 Range range = ranges[mid];
620 return Range.EUROPEAN;
1353 * NumericShaper.Range} constant.
1358 public static NumericShaper getShaper(Range singleRange) {
1397 public static NumericShaper getContextualShaper(Set<Range> ranges) {
1398 NumericShaper shaper = new NumericShaper(Range.EUROPEAN, ranges);
1433 * {@code NumericShaper.Range.EUROPEAN}
1439 public static NumericShaper getContextualShaper(Set<Range> ranges,
1440 Range defaultContext) {
1457 private NumericShaper(Range defaultContext, Set<Range> ranges) {
1463 if (rangeSet.contains(Range.EASTERN_ARABIC)
1464 && rangeSet.contains(Range.ARABIC)) {
1465 rangeSet.remove(Range.ARABIC);
1470 if (rangeSet.contains(Range.TAI_THAM_THAM)
1471 && rangeSet.contains(Range.TAI_THAM_HORA)) {
1472 rangeSet.remove(Range.TAI_THAM_HORA);
1475 rangeArray = rangeSet.toArray(new Range[rangeSet.size()]);
1479 new Comparator<Range>() {
1480 public int compare(Range s1, Range s2) {
1537 shapeContextually(text, start, count, Range.values()[ctxKey]);
1555 * such as {@code NumericShaper.Range.EUROPEAN}
1562 public void shape(char[] text, int start, int count, Range context) {
1572 int key = Range.toRangeIndex(context);
1633 public Set<Range> getRangeSet() {
1637 return Range.maskToRangeSet(mask);
1712 private void shapeContextually(char[] text, int start, int count, Range ctxKey) {
1715 ctxKey = Range.EUROPEAN;
1718 Range lastKey = ctxKey;
1763 * NumericShaper ns2 = NumericShaper.getShaper(NumericShaper.Range.ARABIC);
1785 && rangeSet.equals(Range.maskToRangeSet(rhs.mask))
1786 && shapingRange == Range.indexToRange(rhs.key);
1788 Set<Range> rset = Range.maskToRangeSet(mask);
1789 Range srange = Range.indexToRange(key);
1815 buf.append(shapingRange == null ? Range.values()[key] : shapingRange);
1828 buf.append(Range.values()[i]);
1903 * Converts the {@code NumericShaper.Range} enum-based parameters,
1914 int index = Range.toRangeIndex(shapingRange);
1920 mask |= Range.toRangeMask(rangeSet);