@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Array a)) return false;
        if (!super.equals(o)) return false;
        if (values.size() != a.values.size()) return false;
        if (values instanceof ListWrapper && !(a.values instanceof ListWrapper)) {
            return equalsWithListWrapper(a.values, (ListWrapper<? extends FieldValue>) values);
        } else if (a.values instanceof ListWrapper && !(values instanceof ListWrapper)) {
            return equalsWithListWrapper(values, (ListWrapper<? extends FieldValue>) a.values);
        }
        return values.equals(a.values);
    }
FieldValue which encapsulates an Array value

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