From eda7d8af60e28ff5f949a267ede8f1a553f8a067 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 14 Mar 2012 15:39:43 +0900 Subject: [PATCH] Remove the Builder Change-Id: Idef22e6a82d59e3ec95b95ad237debcb07daf000 --- .../inputmethod/latin/SuggestedWords.java | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 1bc02b52b..60b55f58e 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -76,35 +76,6 @@ public class SuggestedWords { + " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions; } - private static class Builder { - private final boolean mTypedWordValid; - private final boolean mHasMinimalSuggestion; - private final boolean mIsPunctuationSuggestions; - private final boolean mShouldBlockAutoCorrectionBySafetyNet; - private final boolean mAllowsToBeAutoCorrected; - private final List mSuggestedWordInfoList; - - private Builder(final List suggestedWordInfoList, - final boolean typedWordValid, - final boolean hasMinimalSuggestion, - final boolean allowsToBeAutoCorrected, - final boolean isPunctuationSuggestions, - final boolean shouldBlockAutoCorrectionBySafetyNet) { - mSuggestedWordInfoList = suggestedWordInfoList; - mTypedWordValid = typedWordValid; - mHasMinimalSuggestion = hasMinimalSuggestion; - mAllowsToBeAutoCorrected = allowsToBeAutoCorrected; - mIsPunctuationSuggestions = isPunctuationSuggestions; - mShouldBlockAutoCorrectionBySafetyNet = shouldBlockAutoCorrectionBySafetyNet; - } - - public SuggestedWords build() { - return new SuggestedWords(mSuggestedWordInfoList, mTypedWordValid, - mHasMinimalSuggestion, mAllowsToBeAutoCorrected, - mIsPunctuationSuggestions, mShouldBlockAutoCorrectionBySafetyNet); - } - } - public static SuggestedWords getSuggestedWords( final List suggestedWordInfoList, final boolean typedWordValid, @@ -112,12 +83,12 @@ public class SuggestedWords { final boolean allowsToBeAutoCorrected, final boolean isPunctuationSuggestions, final boolean shouldBlockAutoCorrectionBySafetyNet) { - return new Builder(suggestedWordInfoList, + return new SuggestedWords(suggestedWordInfoList, typedWordValid, hasMinimalSuggestion, allowsToBeAutoCorrected, isPunctuationSuggestions, - shouldBlockAutoCorrectionBySafetyNet).build(); + shouldBlockAutoCorrectionBySafetyNet); } public static ArrayList getFromCharSequenceList(