private boolean equalShapes(Shape[] s1, Shape[] s2) {
        if (s1 == null) {
            return s2 == null;   
        }
        if (s2 == null) {
            return false;   
        }
        if (s1.length != s2.length) {
            return false;   
        }
        for (int i = 0; i < s1.length; i++) {
            if (!ShapeUtilities.equal(s1[i], s2[i])) {
                return false;   
            }
        }
        return true;