@Override public boolean equals(Object other) {if (other instanceof CopyOnWriteArrayList) {return this == other|| Arrays.equals(elements, ((CopyOnWriteArrayList<?>) other).elements);} else if (other instanceof List) {Object[] snapshot = elements;Iterator<?> i = ((List<?>) other).iterator();for (Object o : snapshot) {if (!i.hasNext() || !Objects.equal(o, i.next())) {return false;}}return !i.hasNext();} else {return false;}}
public override bool Equals(object other){if (other is java.util.concurrent.CopyOnWriteArrayList<E>){return this == other || java.util.Arrays.equals(elements, ((java.util.concurrent.CopyOnWriteArrayList<E>)other).elements);}else{if (other is java.util.List<E>){object[] snapshot = elements;java.util.Iterator<E> i = ((java.util.List<E>)other).iterator();foreach (object o in snapshot){if (!i.hasNext() || !libcore.util.Objects.equal(o, i.next())){return false;}}return !i.hasNext();}else{return false;}}}