title: How to check people input only japanese language
body: <p>I want use only input japanese language but I don't know how to check between japanese input and anphabe input(sometime user could input a japanese character but missing something)<br>
  So what is my missing idea. I using a dictionary with two for loop but the performance so bad.</p>
  
  <p>This is my code:</p>
  
  <pre><code>public List&lt;String&gt; getAnswer(String rawData) {
          int length = rawData.length();
          List&lt;String&gt; result = new ArrayList&lt;String&gt;();
          for (int i = 0; i &lt; length; i++) {
              for (int j = 0; j &lt; length - i; j++) {
                  String subString = rawData.substring(i, i + j);
                  if (mDict.containsKey(subString)) {
                      result.add(mDict.get(subString));
                          break;
                  }
          }
      }
      return result;
  }
  </code></pre>
  
  <p>And my dictionary:</p>
  
  <pre><code>&lt;string-array name="dict_en"&gt;
     &lt;item&gt;a&lt;/item&gt;
     &lt;item&gt;i&lt;/item&gt;
     &lt;item&gt;u&lt;/item&gt;
     &lt;item&gt;e&lt;/item&gt;
     &lt;item&gt;o&lt;/item&gt;
  &lt;/string-array&gt;
  &lt;string-array name="dict_ja"&gt;
     &lt;item&gt;あ&lt;/item&gt;
     &lt;item&gt;い&lt;/item&gt;
     &lt;item&gt;う&lt;/item&gt;
     &lt;item&gt;え&lt;/item&gt;
     &lt;item&gt;お&lt;/item&gt;
  &lt;/string-array&gt;
  </code></pre>