@Override
    public WeightedSet clone() {
        WeightedSet<K> newSet = (WeightedSet<K>) super.clone();
        newSet.map = (MapFieldValue<K, IntegerFieldValue>) map.clone();
        return newSet;
    }
Creates a new weighted set with a given initial capacity.

@param initialCapacity the initial capacity to use for the encapsulated Map
document/src/main/java/com/yahoo/document/datatypes/WeightedSet.java