aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Dictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-06-13 06:57:40 +0900
committerJean Chalard <jchalard@google.com>2012-06-26 16:44:26 +0900
commitd82898c5a91f8aa69d5dc594b7a9290b8be1247a (patch)
treefa21bce13a047391b2a43534e4452fec881e2c4e /java/src/com/android/inputmethod/latin/Dictionary.java
parentbda7eaa63aace64f3d40eae3affaf281591ffa66 (diff)
downloadlatinime-d82898c5a91f8aa69d5dc594b7a9290b8be1247a.tar.gz
latinime-d82898c5a91f8aa69d5dc594b7a9290b8be1247a.tar.xz
latinime-d82898c5a91f8aa69d5dc594b7a9290b8be1247a.zip
Change the return type of getWords and getBigrams (A8)
This only returns stuff, but it doesn't change yet how the data is really passed. It merely adds a way of getting the same data. Later, the old way will be removed. Change-Id: If3a064de362175fc5a6781b7a97b65d8730aaf3c
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Dictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Dictionary.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java
index c75e55d80..55913b8eb 100644
--- a/java/src/com/android/inputmethod/latin/Dictionary.java
+++ b/java/src/com/android/inputmethod/latin/Dictionary.java
@@ -17,6 +17,9 @@
package com.android.inputmethod.latin;
import com.android.inputmethod.keyboard.ProximityInfo;
+import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
+
+import java.util.ArrayList;
/**
* Abstract base class for a dictionary that can do a fuzzy search for words based on a set of key
@@ -61,9 +64,10 @@ public abstract class Dictionary {
* @param prevWordForBigrams the previous word, or null if none
* @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.
+ * @return the list of suggestions
* @see WordCallback#addWord(char[], int, int, int, int, int)
*/
- abstract public void getWords(final WordComposer composer,
+ abstract public ArrayList<SuggestedWordInfo> getWords(final WordComposer composer,
final CharSequence prevWordForBigrams, final WordCallback callback,
final ProximityInfo proximityInfo);
@@ -73,11 +77,10 @@ public abstract class Dictionary {
* @param composer the key sequence to match
* @param previousWord the word before
* @param callback the callback object to send possible word following previous word
+ * @return the list of suggestions
*/
- public void getBigrams(final WordComposer composer, final CharSequence previousWord,
- final WordCallback callback) {
- // empty base implementation
- }
+ public abstract ArrayList<SuggestedWordInfo> getBigrams(final WordComposer composer,
+ final CharSequence previousWord, final WordCallback callback);
/**
* Checks if the given word occurs in the dictionary