aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-08-21 16:34:55 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-08-22 10:21:38 +0900
commit5f282ea9e4a4590fcbab6e27d5fca7dacbb40a6a (patch)
tree0d91f9bc8a5a79bd6e2c89dcfa3578f88d401091 /java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java
parent06cb4057130d6c42b25862f6f555ce796badbfda (diff)
downloadlatinime-5f282ea9e4a4590fcbab6e27d5fca7dacbb40a6a.tar.gz
latinime-5f282ea9e4a4590fcbab6e27d5fca7dacbb40a6a.tar.xz
latinime-5f282ea9e4a4590fcbab6e27d5fca7dacbb40a6a.zip
Add CollectionUtils class to create generic collection easily
Change-Id: I6b4de9187e122298e5e9cd8ddc9070d062df6a89
Diffstat (limited to 'java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java')
-rw-r--r--java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java b/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java
index 1762e29aa..fe5225ebd 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java
@@ -17,6 +17,7 @@
package com.android.inputmethod.latin.spellcheck;
import com.android.inputmethod.keyboard.ProximityInfo;
+import com.android.inputmethod.latin.CollectionUtils;
import com.android.inputmethod.latin.Constants;
import java.util.TreeMap;
@@ -59,7 +60,7 @@ public class SpellCheckerProximityInfo {
// character.
// Since we need to build such an array, we want to be able to search in our big proximity
// data quickly by character, and a map is probably the best way to do this.
- final private static TreeMap<Integer, Integer> INDICES = new TreeMap<Integer, Integer>();
+ final private static TreeMap<Integer, Integer> INDICES = CollectionUtils.newTreeMap();
// The proximity here is the union of
// - the proximity for a QWERTY keyboard.
@@ -122,7 +123,7 @@ public class SpellCheckerProximityInfo {
}
private static class Cyrillic {
- final private static TreeMap<Integer, Integer> INDICES = new TreeMap<Integer, Integer>();
+ final private static TreeMap<Integer, Integer> INDICES = CollectionUtils.newTreeMap();
// TODO: The following table is solely based on the keyboard layout. Consult with Russian
// speakers on commonly misspelled words/letters.
final static int[] PROXIMITY = {