aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Dictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-01-26 12:49:43 +0900
committerJean Chalard <jchalard@google.com>2012-01-26 13:07:51 +0900
commit6e082cb30dbe1a8cc314b474dc1377b85fdb25c2 (patch)
tree01437bf12b07f29c34d05ef88e5b466da984086d /java/src/com/android/inputmethod/latin/Dictionary.java
parent61b31a646ea5c65f55891354dfd0485cbbcbc997 (diff)
downloadlatinime-6e082cb30dbe1a8cc314b474dc1377b85fdb25c2.tar.gz
latinime-6e082cb30dbe1a8cc314b474dc1377b85fdb25c2.tar.xz
latinime-6e082cb30dbe1a8cc314b474dc1377b85fdb25c2.zip
Convert an internal enum into an int of same underlying value.
Goes together with Id4f4e066 Bug: 5922118 Change-Id: I1e39dd01c67e9284d9d7fe008d868847e69986d7
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Dictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Dictionary.java11
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);