public void replace(K key, V value) {
        List<V> list = map.get(key);
        if (list == null) {
            put(key);
        }
        else {
            list.clear();
            list.add(value);
        }
    }
Put this map in the state where it has just the given value of the given key
vespajlib/src/main/java/com/yahoo/collections/ListMap.java