public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("WeightedSet(").append(getDataType());
        for (Map.Entry entry : map.entrySet()) {
            sb.append("\n  key:   ").append(entry.getKey().getClass()).append(": ").append(entry.getKey());
            sb.append("\n  value: ").append(entry.getValue().getClass()).append(": ").append(entry.getValue());
        }
        return sb.append("\n)").toString();
    }
Uses toString() from the encapsulated Map.

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