@Override
    public V setValue(V value) {
      if (!allowModify)
        throw new UnsupportedOperationException();
      final V old = values[pos];
      values[pos] = value;
      return old;
    }
use nextCharArray() + currentValue() for better efficiency.
linguistics/src/main/java/com/yahoo/language/simple/kstem/CharArrayMap.java