@Override
    public boolean equals(Object o) {

        if (o == this) {
            return true;
        } else if (o instanceof SafeArrayList) {

            final Object[] targetArray = ((SafeArrayList) o).getArray();
            final E[] array = getArray();

            return Arrays.equals(targetArray, array);
        } else if (!(o instanceof List)) {//covers null too
            return false;
        }

        List other = (List)o;
        Iterator i1 = iterator();
        Iterator i2 = other.iterator();
        while (i1.hasNext() && i2.hasNext()) {
            Object o1 = i1.next();
            Object o2 = i2.next();
            if (o1 == o2)
                continue;
            if (o1 == null || !o1.equals(o2))
                return false;
        }
        return !(i1.hasNext() || i2.hasNext());
    }
Returns a current snapshot of this List's backing array that
 is guaranteed not to change through further List manipulation.
 Changes to this array may or may not be reflected in the list and
 should be avoided.

@return either the pre-existing array or a new one
jme3-core/src/main/java/com/jme3/util/SafeArrayList.java