Match the constructor of SuggestedWords to the Builder call.

We have to match one way or another, and the argument order to the
Builder call is more logical.

Change-Id: Iac7c3a351c2687cb294d6a4924fd9cb20ca95177
main
Jean Chalard 2012-03-14 15:33:47 +09:00
parent 7d55c891af
commit 33cc825374
1 changed files with 11 additions and 11 deletions

View File

@ -24,8 +24,8 @@ import java.util.HashSet;
import java.util.List;
public class SuggestedWords {
public static final SuggestedWords EMPTY = new SuggestedWords(false, false, false, false,
false, Collections.<SuggestedWordInfo>emptyList());
public static final SuggestedWords EMPTY = new SuggestedWords(
Collections.<SuggestedWordInfo>emptyList(), false, false, false, false, false);
public final boolean mTypedWordValid;
public final boolean mHasAutoCorrectionCandidate;
@ -33,18 +33,18 @@ public class SuggestedWords {
public final boolean mAllowsToBeAutoCorrected;
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
private SuggestedWords(final boolean typedWordValid,
private SuggestedWords(final List<SuggestedWordInfo> suggestedWordInfoList,
final boolean typedWordValid,
final boolean hasAutoCorrectionCandidate,
final boolean isPunctuationSuggestions,
final boolean shouldBlockAutoCorrectionBySafetyNet,
final boolean allowsToBeAutoCorrected,
final List<SuggestedWordInfo> suggestedWordInfoList) {
final boolean isPunctuationSuggestions,
final boolean shouldBlockAutoCorrectionBySafetyNet) {
mSuggestedWordInfoList = suggestedWordInfoList;
mTypedWordValid = typedWordValid;
mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate
&& !shouldBlockAutoCorrectionBySafetyNet;
mIsPunctuationSuggestions = isPunctuationSuggestions;
mAllowsToBeAutoCorrected = allowsToBeAutoCorrected;
mSuggestedWordInfoList = suggestedWordInfoList;
mIsPunctuationSuggestions = isPunctuationSuggestions;
}
public int size() {
@ -99,9 +99,9 @@ public class SuggestedWords {
}
public SuggestedWords build() {
return new SuggestedWords(mTypedWordValid, mHasMinimalSuggestion,
mIsPunctuationSuggestions, mShouldBlockAutoCorrectionBySafetyNet,
mAllowsToBeAutoCorrected, mSuggestedWordInfoList);
return new SuggestedWords(mSuggestedWordInfoList, mTypedWordValid,
mHasMinimalSuggestion, mAllowsToBeAutoCorrected,
mIsPunctuationSuggestions, mShouldBlockAutoCorrectionBySafetyNet);
}
}