diff options
author | 2012-01-25 21:13:56 -0800 | |
---|---|---|
committer | 2012-01-25 21:13:56 -0800 | |
commit | 5a38ff305f6ee95cecf2d337b7efda1eacff8140 (patch) | |
tree | 455275048d69001c4337cfcabaa73c645629186d /java/src/com/android/inputmethod/latin/Dictionary.java | |
parent | fda847a870829f1491cbd5325f9c985213081149 (diff) | |
parent | 6e082cb30dbe1a8cc314b474dc1377b85fdb25c2 (diff) | |
download | latinime-5a38ff305f6ee95cecf2d337b7efda1eacff8140.tar.gz latinime-5a38ff305f6ee95cecf2d337b7efda1eacff8140.tar.xz latinime-5a38ff305f6ee95cecf2d337b7efda1eacff8140.zip |
Merge "Convert an internal enum into an int of same underlying value."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Dictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Dictionary.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java index c35b42877..79bf33850 100644 --- a/java/src/com/android/inputmethod/latin/Dictionary.java +++ b/java/src/com/android/inputmethod/latin/Dictionary.java @@ -33,9 +33,8 @@ public abstract class Dictionary { */ protected static final int FULL_WORD_SCORE_MULTIPLIER = 2; - public static enum DataType { - UNIGRAM, BIGRAM - } + public static final int UNIGRAM = 0; + public static final int BIGRAM = 1; /** * Interface to be implemented by classes requesting words to be fetched from the dictionary. @@ -51,11 +50,11 @@ public abstract class Dictionary { * @param score the score of occurrence. This is normalized between 1 and 255, but * can exceed those limits * @param dicTypeId of the dictionary where word was from - * @param dataType tells type of this data + * @param dataType tells type of this data, either UNIGRAM or BIGRAM * @return true if the word was added, false if no more words are required */ boolean addWord(char[] word, int wordOffset, int wordLength, int score, int dicTypeId, - DataType dataType); + int dataType); } /** @@ -64,7 +63,7 @@ public abstract class Dictionary { * @param composer the key sequence to match * @param callback the callback object to send matched words to as possible candidates * @param proximityInfo the object for key proximity. May be ignored by some implementations. - * @see WordCallback#addWord(char[], int, int, int, int, DataType) + * @see WordCallback#addWord(char[], int, int, int, int, int) */ abstract public void getWords(final WordComposer composer, final WordCallback callback, final ProximityInfo proximityInfo); |