Iterator is an interface that allows iteration over a sequence of objects.

import java.util.Iterator;

/**
 * Utility methods to help in Iterable interactions.
 *
 */
public final class IterableUtil {

    /** Compares two sequences of values and returns true if sequence members are equal and in the same order */
    public static <T> boolean sequenceEqual(Iterable<T> one, Iterable<T> two) {
        Iterator<T> iter1 = one.iterator();
        Iterator<T> iter2 = two.iterator();

        while (iter1.hasNext() && iter2.hasNext()) {
            if (iter1.next() != iter2.next()) {
                return false;
            }
        }
        return (!iter1.hasNext() && !iter2.hasNext());
    }
}

NB/= More documentation coming soon.