Add pretty-printing to SuggestedWords.Builder to help debug

Change-Id: I2f40ca40f2b452078d0f24cef72e0182e10e2269
main
Jean Chalard 2011-10-07 14:35:18 +09:00
parent ce9e4f926b
commit af0f13d15c
1 changed files with 13 additions and 0 deletions

View File

@ -175,6 +175,19 @@ public class SuggestedWords {
public CharSequence getWord(int pos) {
return mWords.get(pos);
}
public String toString() {
// Pretty-print method to help debug
final StringBuilder sb = new StringBuilder("StringBuilder: mTypedWordValid = "
+ mTypedWordValid + " ; mHasMinimalSuggestion = " + mHasMinimalSuggestion
+ " ; mIsPunctuationSuggestions = " + mIsPunctuationSuggestions
+ " --- ");
for (CharSequence s : mWords) {
sb.append(s);
sb.append(" ; ");
}
return sb.toString();
}
}
public static class SuggestedWordInfo {