@Override
    public Object getKey() {
      // we must clone here, as putAll to another CharArrayMap
      // with other case sensitivity flag would corrupt the keys
      return keys[pos].clone();
    }
use nextCharArray() + currentValue() for better efficiency.
linguistics/src/main/java/com/yahoo/language/simple/kstem/CharArrayMap.java