@Override
    public String set(int i, String element) {
        int existing = stems.indexOf(element);
        if (existing >= 0 && existing != i) {
            // the element already exists
            return element;
        } else {
            return stems.set(i, element);
        }
    }
A list of strings which does not allow for duplicate elements.

@author steinar
linguistics/src/main/java/com/yahoo/language/process/StemList.java