private IntegerFieldValue wrapValue(Object o) {
            if (o==null) return null;
            if (o instanceof IntegerFieldValue) return (IntegerFieldValue) o;
            if (o instanceof Integer) return new IntegerFieldValue((Integer) o);
            IntegerFieldValue value = new IntegerFieldValue();
            value.assign(o);
            return value;
        }
Weighted set MapFieldValue, backed by map of native Java types.
Note: The key type of this is FieldValue, not K.
@author vegardh
document/src/main/java/com/yahoo/document/datatypes/WeightedSet.java