diff options
author | 2012-03-13 16:36:21 +0900 | |
---|---|---|
committer | 2012-03-13 19:07:42 +0900 | |
commit | 674ffcdf9361b3c90cc39daf02f3217fb6d870de (patch) | |
tree | 19bc680ceb3dc8b63d2bb81a6831974a4db2f351 /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | d6662ecd306e1084af81c79df61cf52ef6da75ea (diff) | |
download | latinime-674ffcdf9361b3c90cc39daf02f3217fb6d870de.tar.gz latinime-674ffcdf9361b3c90cc39daf02f3217fb6d870de.tar.xz latinime-674ffcdf9361b3c90cc39daf02f3217fb6d870de.zip |
Make an add into a set.
This method now only sets words, so it should be named set.
The functionality is identical since there are no more places
where the list is reused.
This will also allow to make the list final in an upcoming change.
Change-Id: I25b0c7d7f13c3fa5d89806f01f48f1026769603f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 487e91b0e..a5c70eca9 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -270,7 +270,7 @@ public class Suggest implements Dictionary.WordCallback { StringUtils.removeDupes(mSuggestions); return new SuggestedWords.Builder() - .addWords(SuggestedWords.Builder.getFromCharSequenceList(mSuggestions)) + .setWords(SuggestedWords.Builder.getFromCharSequenceList(mSuggestions)) .setAllowsToBeAutoCorrected(false) .setHasAutoCorrection(false); } @@ -424,12 +424,12 @@ public class Suggest implements Dictionary.WordCallback { scoreInfoList.add(new SuggestedWords.SuggestedWordInfo(mSuggestions.get(i), "--", false)); } - builder = new SuggestedWords.Builder().addWords(scoreInfoList) + builder = new SuggestedWords.Builder().setWords(scoreInfoList) .setAllowsToBeAutoCorrected(allowsToBeAutoCorrected) .setHasAutoCorrection(hasAutoCorrection); } else { builder = new SuggestedWords.Builder() - .addWords(SuggestedWords.Builder.getFromCharSequenceList(mSuggestions)) + .setWords(SuggestedWords.Builder.getFromCharSequenceList(mSuggestions)) .setAllowsToBeAutoCorrected(allowsToBeAutoCorrected) .setHasAutoCorrection(hasAutoCorrection); } |