You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/09/01 21:50:54 UTC
(commons-collections) branch master updated: Javadoc
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
The following commit(s) were added to refs/heads/master by this push:
new 8f121670d Javadoc
8f121670d is described below
commit 8f121670d492a77f3d782823500bc6bd2c377ef5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Sep 1 17:50:50 2024 -0400
Javadoc
- Close HTML tags
- Reduce whitespace
---
.../collections4/iterators/CartesianProductIterator.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/iterators/CartesianProductIterator.java b/src/main/java/org/apache/commons/collections4/iterators/CartesianProductIterator.java
index 2aea03922..a868b0942 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/CartesianProductIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/CartesianProductIterator.java
@@ -29,7 +29,7 @@ import java.util.Objects;
* The iterables provided to the constructor are used in reverse order, each
* until exhaustion before proceeding to the next element of the prior iterable
* and repeating. Consider the following example:
- *
+ * </p>
* <pre>{@code
* List<Character> iterable1 = Arrays.asList('A', 'B', 'C');
* List<Character> iterable2 = Arrays.asList('1', '2', '3');
@@ -41,9 +41,9 @@ import java.util.Objects;
* System.out.println(tuple.get(0) + ", " + tuple.get(1));
* }
* }</pre>
- *
+ * <p>
* The output will be:
- *
+ * </p>
* <pre>
* A, 1
* A, 2
@@ -58,10 +58,12 @@ import java.util.Objects;
* <p>
* The {@code remove()} operation is not supported, and will throw an
* {@code UnsupportedOperationException}.
+ * </p>
* <p>
* If any of the input iterables is empty, the Cartesian product will be empty.
* If any of the input iterables is infinite, the Cartesian product will be
* infinite.
+ * </p>
*
* @param <E> the type of the objects being permuted
* @since 4.5.0
@@ -127,7 +129,6 @@ public class CartesianProductIterator<E> implements Iterator<List<E>> {
if (!hasNext()) {
throw new NoSuchElementException();
}
-
if (previousTuple == null) {
previousTuple = new ArrayList<>(iterables.size());
for (final Iterator<? extends E> iterator : iterators) {
@@ -135,7 +136,6 @@ public class CartesianProductIterator<E> implements Iterator<List<E>> {
}
return new ArrayList<>(previousTuple);
}
-
for (int i = iterators.size() - 1; i >= 0; i--) {
Iterator<? extends E> iterator = iterators.get(i);
if (iterator.hasNext()) {