@Override
    public void assign(Object o) {
        if (!checkAssign(o)) {
            return;
        }

        if (o instanceof MapFieldValue a) {
            if (o == this) return;
            values.clear();
            putAll(a);
        } else if (o instanceof Map) {
            values = new MapWrapper((Map)o);
        }
        else {
            throw new IllegalArgumentException("Class " + o.getClass() + " not applicable to an " + this.getClass() + " instance.");
        }
    }
Vespa map. Backed by and parametrized by FieldValue

@author vegardh
document/src/main/java/com/yahoo/document/datatypes/MapFieldValue.java