Class Linq4j.CartesianProductListEnumerator<E>

  • Type Parameters:
    E - element type
    All Implemented Interfaces:
    java.lang.AutoCloseable, Enumerator<java.util.List<E>>
    Enclosing class:

    private static class Linq4j.CartesianProductListEnumerator<E>
    extends CartesianProductEnumerator<E,​java.util.List<E>>
    Enumerates over the cartesian product of the given lists, returning a list for each row.
    • Constructor Detail

      • CartesianProductListEnumerator

        CartesianProductListEnumerator​(java.util.List<Enumerator<E>> enumerators)
    • Method Detail

      • current

        public java.util.List<E> current()
        Description copied from interface: Enumerator
        Gets the current element in the collection.

        After an enumerator is created or after the Enumerator.reset() method is called, the Enumerator.moveNext() method must be called to advance the enumerator to the first element of the collection before reading the value of the current property; otherwise, current is undefined.

        This method also throws NoSuchElementException if the last call to moveNext returned false, which indicates the end of the collection.

        This method does not move the position of the enumerator, and consecutive calls to current return the same object until either moveNext or reset is called.

        An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated. The next call to moveNext or reset may, at the discretion of the implementation, throw a ConcurrentModificationException. If the collection is modified between moveNext and current, current returns the element that it is set to, even if the enumerator is already invalidated.

        Current element