diff options
author | 2011-10-07 14:35:18 +0900 | |
---|---|---|
committer | 2011-10-07 14:35:18 +0900 | |
commit | af0f13d15cd2edcb68fda9961c39dc6511edaafd (patch) | |
tree | 6a78970511d31023d2d10796fa85c358b62e8cce /java/src | |
parent | ce9e4f926b69745834df677501e59c6db3744de4 (diff) | |
download | latinime-af0f13d15cd2edcb68fda9961c39dc6511edaafd.tar.gz latinime-af0f13d15cd2edcb68fda9961c39dc6511edaafd.tar.xz latinime-af0f13d15cd2edcb68fda9961c39dc6511edaafd.zip |
Add pretty-printing to SuggestedWords.Builder to help debug
Change-Id: I2f40ca40f2b452078d0f24cef72e0182e10e2269
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index b177d144a..005db36bd 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -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 { |