public Integer get(Object key) {
        if (!(key instanceof FieldValue)) {
            throw new IllegalArgumentException("Only FieldValues are allowed as keys.");
        }
        IntegerFieldValue ifv = map.get(key);
        return ifv != null ? ifv.getInteger() : null;
    }
Returns the weight associated with the specified key.

@param key the key to return the weight for
@return the weight associated with the specified key, or null (if not found)
document/src/main/java/com/yahoo/document/datatypes/WeightedSet.java