@Override
    public int compareTo(FieldValue fieldValue) {
        int comp = super.compareTo(fieldValue);

        if (comp != 0) {
            return comp;
        }

        return map.compareTo(((WeightedSet<K>)fieldValue).map);
    }
Uses toString() from the encapsulated Map.

@return the toString() of this set
document/src/main/java/com/yahoo/document/datatypes/WeightedSet.java