E - element typeprivate static class Linq4j.CartesianProductListEnumerator<E> extends CartesianProductEnumerator<E,List<E>>
elements| Constructor and Description |
|---|
CartesianProductListEnumerator(List<Enumerator<E>> enumerators) |
| Modifier and Type | Method and Description |
|---|---|
List<E> |
current()
Gets the current element in the collection.
|
close, moveNext, resetCartesianProductListEnumerator(List<Enumerator<E>> enumerators)
public List<E> current()
EnumeratorAfter 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.
Copyright © 2012–2021 The Apache Software Foundation. All rights reserved.