src/org/kocakosm/pitaya/collection/Iterators.java
public static boolean equal(Iterator<?> i1, Iterator<?> i2)
	{
		if (i1 == i2) {
			return true;
		}
		if (i1 == null || i2 == null) {
			return false;
		}
		while (i1.hasNext() && i2.hasNext()) {
			if (!XObjects.equal(i1.next(), i2.next())) {
				return false;
			}
		}
		return !(i1.hasNext() || i2.hasNext());
	}
public static boolean equal(Iterator<?> i1, Iterator<?> i2)
	{
		if (i1 == i2) {
			return true;
		}
		if (i1 == null || i2 == null) {
			return false;
		}
		while (i1.hasNext() && i2.hasNext()) {
			if (!XObjects.equal(i1.next(), i2.next())) {
				return false;
			}
		}
		return !(i1.hasNext() || i2.hasNext());
	}
Returns whether the given {@code Iterator}s contain equal elements in
the same order. Note that this method consumes entirely the input
{@code Iterator}s.

@param i1 the first {@code Iterator}.
@param i2 the second {@code Iterator}.

@return whether the given {@code Iterator} have the same content.