diff options
author | 2011-05-13 21:11:19 +0900 | |
---|---|---|
committer | 2011-05-13 21:11:19 +0900 | |
commit | def6b35a9ed78d128d4cb5e8414c865503ec4192 (patch) | |
tree | 77491cd71b65419fa63d1aacc28288e7e9f8aa99 /java/src/com/android/inputmethod/latin/WordAlternatives.java | |
parent | 55f38adab99937eef97626136f57520ebe9c04a9 (diff) | |
parent | 96e822c94c50c548d64e86e0c2c52022a63cc319 (diff) | |
download | latinime-def6b35a9ed78d128d4cb5e8414c865503ec4192.tar.gz latinime-def6b35a9ed78d128d4cb5e8414c865503ec4192.tar.xz latinime-def6b35a9ed78d128d4cb5e8414c865503ec4192.zip |
Merge remote-tracking branch 'goog/master' into merge
Conflicts:
java/res/xml/method.xml
Change-Id: I455cb689f3a1baca7cc8b8ef88d9dbcdca8128a3
Diffstat (limited to 'java/src/com/android/inputmethod/latin/WordAlternatives.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/WordAlternatives.java | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/java/src/com/android/inputmethod/latin/WordAlternatives.java b/java/src/com/android/inputmethod/latin/WordAlternatives.java deleted file mode 100644 index 0e9914400..000000000 --- a/java/src/com/android/inputmethod/latin/WordAlternatives.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.android.inputmethod.latin; - -import com.android.inputmethod.keyboard.KeyboardSwitcher; - -import android.text.TextUtils; - -public class WordAlternatives { - public final CharSequence mChosenWord; - public final WordComposer mWordComposer; - - public WordAlternatives(CharSequence chosenWord, WordComposer wordComposer) { - mChosenWord = chosenWord; - mWordComposer = wordComposer; - } - - public CharSequence getChosenWord() { - return mChosenWord; - } - - public CharSequence getOriginalWord() { - return mWordComposer.getTypedWord(); - } - - public SuggestedWords.Builder getAlternatives( - Suggest suggest, KeyboardSwitcher keyboardSwitcher) { - return getTypedSuggestions(suggest, keyboardSwitcher, mWordComposer); - } - - @Override - public int hashCode() { - return mChosenWord.hashCode(); - } - - @Override - public boolean equals(Object o) { - return o instanceof CharSequence && TextUtils.equals(mChosenWord, (CharSequence)o); - } - - private static SuggestedWords.Builder getTypedSuggestions( - Suggest suggest, KeyboardSwitcher keyboardSwitcher, WordComposer word) { - return suggest.getSuggestedWordBuilder(keyboardSwitcher.getInputView(), word, null); - } -}
\ No newline at end of file |