aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-08-21 20:15:43 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-21 20:15:43 -0700
commitbf661bbab05eb9ecbfa7b3b9a82a7d41e795ed4a (patch)
tree767107659448fb6da349467476ef083de5b57f23 /java/src/com/android/inputmethod/latin/Suggest.java
parent30904b2b4d45abbda8d19da3cc5f7228bfe2e4b5 (diff)
parenteb59a87a074348d30191e57308221531ae613001 (diff)
downloadlatinime-bf661bbab05eb9ecbfa7b3b9a82a7d41e795ed4a.tar.gz
latinime-bf661bbab05eb9ecbfa7b3b9a82a7d41e795ed4a.tar.xz
latinime-bf661bbab05eb9ecbfa7b3b9a82a7d41e795ed4a.zip
am eb59a87a: Merge "Add CollectionUtils class to create generic collection easily" into jb-mr1-dev
* commit 'eb59a87a074348d30191e57308221531ae613001': Add CollectionUtils class to create generic collection easily
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index c75322691..51ed09604 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -51,7 +51,7 @@ public class Suggest {
private Dictionary mMainDictionary;
private ContactsBinaryDictionary mContactsDict;
private final ConcurrentHashMap<String, Dictionary> mDictionaries =
- new ConcurrentHashMap<String, Dictionary>();
+ CollectionUtils.newConcurrentHashMap();
public static final int MAX_SUGGESTIONS = 18;
@@ -242,7 +242,7 @@ public class Suggest {
}
final ArrayList<SuggestedWordInfo> suggestionsContainer =
- new ArrayList<SuggestedWordInfo>(suggestionsSet);
+ CollectionUtils.newArrayList(suggestionsSet);
final int suggestionsCount = suggestionsContainer.size();
final boolean isFirstCharCapitalized = wordComposer.isFirstCharCapitalized();
final boolean isAllUpperCase = wordComposer.isAllUpperCase();
@@ -307,7 +307,7 @@ public class Suggest {
}
final ArrayList<SuggestedWordInfo> suggestionsContainer =
- new ArrayList<SuggestedWordInfo>(suggestionsSet);
+ CollectionUtils.newArrayList(suggestionsSet);
final int suggestionsCount = suggestionsContainer.size();
final boolean isFirstCharCapitalized = wordComposer.wasShiftedNoLock();
final boolean isAllUpperCase = wordComposer.isAllUpperCase();
@@ -338,7 +338,7 @@ public class Suggest {
typedWordInfo.setDebugString("+");
final int suggestionsSize = suggestions.size();
final ArrayList<SuggestedWordInfo> suggestionsList =
- new ArrayList<SuggestedWordInfo>(suggestionsSize);
+ CollectionUtils.newArrayList(suggestionsSize);
suggestionsList.add(typedWordInfo);
// Note: i here is the index in mScores[], but the index in mSuggestions is one more
// than i because we added the typed word to mSuggestions without touching mScores.
@@ -391,7 +391,7 @@ public class Suggest {
}
public void close() {
- final HashSet<Dictionary> dictionaries = new HashSet<Dictionary>();
+ final HashSet<Dictionary> dictionaries = CollectionUtils.newHashSet();
dictionaries.addAll(mDictionaries.values());
for (final Dictionary dictionary : dictionaries) {
dictionary.close();