private void removeAndAdd(ErrorMessage error) {
        errors.remove(error);
        errors.add(error);
    }
This is basically a way of making a list simulate a set.
container-search/src/main/java/com/yahoo/search/result/DefaultErrorHit.java