aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/SuggestedWords.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-13 19:40:24 +0900
committerJean Chalard <jchalard@google.com>2012-03-13 19:53:38 +0900
commitb5eeb724fc98bb7169683539027d9ba54ffb8b14 (patch)
tree1d122f69f54e0a0a7f885dc2cf4cd6aa12ed81a7 /java/src/com/android/inputmethod/latin/SuggestedWords.java
parentc60fea852d0eaaed7f212dbab0af500d07188c69 (diff)
downloadlatinime-b5eeb724fc98bb7169683539027d9ba54ffb8b14.tar.gz
latinime-b5eeb724fc98bb7169683539027d9ba54ffb8b14.tar.xz
latinime-b5eeb724fc98bb7169683539027d9ba54ffb8b14.zip
Make some more Builder attributes final.
Change-Id: I3132b7fe4ee97c566736bfc21c3783cfc79fc7ff
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java20
1 files changed, 7 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index 676563e1d..d41f84798 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -75,13 +75,17 @@ public class SuggestedWords {
public static class Builder {
private boolean mTypedWordValid;
private boolean mHasMinimalSuggestion;
- private boolean mIsPunctuationSuggestions;
+ private final boolean mIsPunctuationSuggestions;
private boolean mShouldBlockAutoCorrectionBySafetyNet;
- private boolean mAllowsToBeAutoCorrected;
+ private final boolean mAllowsToBeAutoCorrected;
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
- public Builder(final List<SuggestedWordInfo> suggestedWordInfoList) {
+ public Builder(final List<SuggestedWordInfo> suggestedWordInfoList,
+ final boolean allowsToBeAutoCorrected,
+ final boolean isPunctuationSuggestions) {
mSuggestedWordInfoList = suggestedWordInfoList;
+ mAllowsToBeAutoCorrected = allowsToBeAutoCorrected;
+ mIsPunctuationSuggestions = isPunctuationSuggestions;
}
public static List<SuggestedWordInfo> getFromCharSequenceList(
@@ -112,21 +116,11 @@ public class SuggestedWords {
return this;
}
- public Builder setIsPunctuationSuggestions() {
- mIsPunctuationSuggestions = true;
- return this;
- }
-
public Builder setShouldBlockAutoCorrectionBySafetyNet() {
mShouldBlockAutoCorrectionBySafetyNet = true;
return this;
}
- public Builder setAllowsToBeAutoCorrected(final boolean allowsToBeAutoCorrected) {
- mAllowsToBeAutoCorrected = allowsToBeAutoCorrected;
- return this;
- }
-
// Should get rid of the first one (what the user typed previously) from suggestions
// and replace it with what the user currently typed.
public static ArrayList<SuggestedWordInfo> getTypedWordAndPreviousSuggestions(