Class Linq4j.CartesianProductListEnumerator<E>
- java.lang.Object
-
- org.apache.calcite.linq4j.CartesianProductEnumerator<E,List<E>>
-
- org.apache.calcite.linq4j.Linq4j.CartesianProductListEnumerator<E>
-
- Type Parameters:
E- element type
- All Implemented Interfaces:
AutoCloseable,Enumerator<E>
- Enclosing class:
- Linq4j
private static class Linq4j.CartesianProductListEnumerator<E> extends CartesianProductEnumerator<E,List<E>>
Enumerates over the cartesian product of the given lists, returning a list for each row.
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.linq4j.CartesianProductEnumerator
elements
-
-
Constructor Summary
Constructors Constructor Description CartesianProductListEnumerator(List<Enumerator<E>> enumerators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<E>current()Gets the current element in the collection.-
Methods inherited from class org.apache.calcite.linq4j.CartesianProductEnumerator
close, moveNext, reset
-
-
-
-
Constructor Detail
-
CartesianProductListEnumerator
CartesianProductListEnumerator(List<Enumerator<E>> enumerators)
-
-
Method Detail
-
current
public List<E> current()
Description copied from interface:EnumeratorGets the current element in the collection.After an enumerator is created or after the
Enumerator.reset()method is called, theEnumerator.moveNext()method must be called to advance the enumerator to the first element of the collection before reading the value of thecurrentproperty; otherwise,currentis undefined.This method also throws
NoSuchElementExceptionif the last call tomoveNextreturnedfalse, which indicates the end of the collection.This method does not move the position of the enumerator, and consecutive calls to
currentreturn the same object until eithermoveNextorresetis 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
moveNextorresetmay, at the discretion of the implementation, throw aConcurrentModificationException. If the collection is modified betweenmoveNextandcurrent,currentreturns the element that it is set to, even if the enumerator is already invalidated.- Returns:
- Current element
-
-