aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Dictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-01-25 21:15:19 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-25 21:15:19 -0800
commite8ff9e107b4f57da7c7b3d3d6849bf538a5c6e89 (patch)
tree455275048d69001c4337cfcabaa73c645629186d /java/src/com/android/inputmethod/latin/Dictionary.java
parent159789c9625d58770221cd73094e6832f62650e9 (diff)
parent5a38ff305f6ee95cecf2d337b7efda1eacff8140 (diff)
downloadlatinime-e8ff9e107b4f57da7c7b3d3d6849bf538a5c6e89.tar.gz
latinime-e8ff9e107b4f57da7c7b3d3d6849bf538a5c6e89.tar.xz
latinime-e8ff9e107b4f57da7c7b3d3d6849bf538a5c6e89.zip
am 5a38ff30: Merge "Convert an internal enum into an int of same underlying value."
* commit '5a38ff305f6ee95cecf2d337b7efda1eacff8140': 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.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);