public boolean equals(Object o) { if (o instanceof List) { List l = (List) o; int s1 = size(); int s2 = l.size(); if (s1 != s2) { return false; } Iterator it1 = iterator(); Iterator it2 = iterator(); while (it1.hasNext()) { Object o1 = it1.next(); if (it2.hasNext()) { Object o2 = it2.next(); if (!o1.equals(o2)) { return false; } } else { return false; } } if (it2.hasNext()) { return false; } return true; } else { return super.equals(o); }
public boolean equals(Object obj) { throw new UnsupportedOperationException();
    public boolean equals(Object o) {        if (o instanceof List) {            List l = (List) o;            int s1 = size();            int s2 = l.size();            if (s1 != s2) { return false; }            Iterator it1 = iterator();            Iterator it2 = iterator();            while (it1.hasNext()) {                Object o1 = it1.next();                if (it2.hasNext()) {                    Object o2 = it2.next();                    if (!o1.equals(o2)) {                        return false;                    }                } else {                    return false;                }            }            if (it2.hasNext()) {                return false;            }            return true;        } else {            return super.equals(o);        }    }