Package com.ibm.icu.util

Examples of com.ibm.icu.util.BytesTrie$Iterator


    }
    return getName(nameGroupOffset, nameChoice);
  }

  private int getPropertyOrValueEnum(final int bytesTrieOffset, final CharSequence alias) {
    BytesTrie trie = new BytesTrie(bytesTries, bytesTrieOffset);
    if (containsName(trie, alias)) {
      return trie.getValue();
    } else {
      return UProperty.UNDEFINED;
    }
  }
View Full Code Here


        return delta;
    }

    public int matches(CharacterIterator text_, int maxLength, int[] lengths, int[] count_, int limit, int[] values) {
        UCharacterIterator text = UCharacterIterator.getInstance(text_);
        BytesTrie bt = new BytesTrie(characters, 0);
        int c = text.nextCodePoint();
        Result result = bt.first(transform(c));
        // TODO: should numChars count Character.charCount() ?
        int numChars = 1;
        int count = 0;
        for (;;) {
            if (result.hasValue()) {
                if (count < limit) {
                    if (values != null) {
                        values[count] = bt.getValue();
                    }
                    lengths[count] = numChars;
                    count++;
                }
                if (result == Result.FINAL_VALUE) {
                    break;
                }
            } else if (result == Result.NO_MATCH) {
                break;
            }

            if (numChars >= maxLength) {
                break;
            }

            c = text.nextCodePoint();
            ++numChars;
            result = bt.next(transform(c));
        }
        count_[0] = count;
        return numChars;
    }
View Full Code Here

TOP

Related Classes of com.ibm.icu.util.BytesTrie$Iterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.