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

        if (o instanceof Array) {
            if (o == this) return;
            Array a = (Array) o;
            values.clear();
            addAll(a.values);
        } else if (o instanceof List) {
            values = new ListWrapper<T>((List) o);
        } else {
            throw new IllegalArgumentException("Class " + o.getClass() + " not applicable to an " + this.getClass() + " instance.");
        }
    }
FieldValue which encapsulates an Array value

@author Einar M R Rosenvinge
document/src/main/java/com/yahoo/document/datatypes/Array.java