boolean (Object o) { if (o == this) { return true; } if (!(o instanceof List)) { return false; } List<?> list = (List<?>)o; Iterator<?> it = list.iterator(); for (Object element : get()) { if (!it.hasNext() || !Objects.equals(element, it.next())) { return false; } } return !it.hasNext(); }