equal
deleted
inserted
replaced
72 val m = dictionary.getClass.getDeclaredMethod("add", classOf[String]) |
72 val m = dictionary.getClass.getDeclaredMethod("add", classOf[String]) |
73 m.setAccessible(true) |
73 m.setAccessible(true) |
74 m.invoke(dictionary, word) |
74 m.invoke(dictionary, word) |
75 } |
75 } |
76 |
76 |
77 def check(word: String): Boolean = |
77 def contains(word: String): Boolean = |
78 { |
78 { |
79 val m = dictionary.getClass.getSuperclass.getDeclaredMethod("exist", classOf[String]) |
79 val m = dictionary.getClass.getSuperclass.getDeclaredMethod("exist", classOf[String]) |
80 m.setAccessible(true) |
80 m.setAccessible(true) |
81 m.invoke(dictionary, word).asInstanceOf[java.lang.Boolean].booleanValue |
81 m.invoke(dictionary, word).asInstanceOf[java.lang.Boolean].booleanValue |
82 } |
82 } |
|
83 |
|
84 def check(word: String): Boolean = |
|
85 contains(word) || |
|
86 Library.is_all_caps(word) && contains(Library.lowercase(word, locale)) || |
|
87 Library.is_capitalized(word) && |
|
88 (contains(Library.lowercase(word, locale)) || contains(Library.uppercase(word, locale))) |
83 |
89 |
84 def complete(word: String): List[String] = |
90 def complete(word: String): List[String] = |
85 { |
91 { |
86 val m = dictionary.getClass.getSuperclass. |
92 val m = dictionary.getClass.getSuperclass. |
87 getDeclaredMethod("searchSuggestions", classOf[String]) |
93 getDeclaredMethod("searchSuggestions", classOf[String]) |