Commit a8ff3c5c authored by Alfonso Landin's avatar Alfonso Landin 🤷
Browse files

Publish javadoc

parent f85d312c
image: maven:3-jdk-8-slim
pages:
stage: deploy
tags:
- pages
script:
- mvn javadoc:javadoc
- mkdir public
- mv target/site/apidocs public/
artifacts:
paths:
- public
only:
- master
......@@ -29,3 +29,4 @@ CartesianProduct.of(iterable1, iterable2, iterable3, iterable4, iterable5, itera
```
The complete API can be seen [here](https://pages.irlab.org/irlab/cartesian-product/apidocs/)
......@@ -131,6 +131,16 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>https://javadoc.io/doc/org.jooq/jool-java-8/0.9.13/</link>
</links>
</configuration>
</plugin>
</plugins>
</build>
......
......@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.irlab.cartesianproduct;
import java.util.ArrayList;
......@@ -35,7 +36,7 @@ import net.jqwik.api.Property;
import net.jqwik.api.Provide;
/**
*
*
* @author alfonso.landin@udc.es
*
*/
......@@ -52,8 +53,8 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size();
final List<Tuple2<Integer, Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i1: l1) {
for (final Integer i2: l2) {
expected.add(new Tuple2<>(i1, i2));
}
}
......@@ -71,9 +72,9 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size();
final List<Tuple3<Integer, Integer, Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
expected.add(new Tuple3<>(i1, i2, i3));
}
}
......@@ -94,9 +95,9 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size();
final List<Tuple3<Integer, Integer, Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
expected.add(new Tuple3<>(i1, i2, i3));
}
}
......@@ -115,20 +116,20 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size() * l4.size();
final List<Tuple4<Integer, Integer, Integer, Integer>> expected = new ArrayList<>(
expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i4 : l4) {
final List<Tuple4<Integer, Integer, Integer,
Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
for (final Integer i4: l4) {
expected.add(new Tuple4<>(i1, i2, i3, i4));
}
}
}
}
final List<Tuple4<Integer, Integer, Integer, Integer>> obtained = new ArrayList<>(
expectedSize);
final List<Tuple4<Integer, Integer, Integer,
Integer>> obtained = new ArrayList<>(expectedSize);
CartesianProduct.of(l1, l2, l3, l4)
.forEach((i1, i2, i3, i4) -> obtained.add(new Tuple4<>(i1, i2, i3, i4)));
......@@ -143,20 +144,20 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size() * l4.size();
final List<Tuple4<Integer, Integer, Integer, Integer>> expected = new ArrayList<>(
expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i4 : l4) {
final List<Tuple4<Integer, Integer, Integer,
Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
for (final Integer i4: l4) {
expected.add(new Tuple4<>(i1, i2, i3, i4));
}
}
}
}
final List<Tuple4<Integer, Integer, Integer, Integer>> obtained = new ArrayList<>(
expectedSize);
final List<Tuple4<Integer, Integer, Integer,
Integer>> obtained = new ArrayList<>(expectedSize);
CartesianProduct.of(l1, l2, l3, l4)
.forEach((i1, i2, i3, i4) -> obtained.add(new Tuple4<>(i1, i2, i3, i4)));
......@@ -172,13 +173,13 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size() * l4.size() * l5.size();
final List<Tuple5<Integer, Integer, Integer, Integer, Integer>> expected = new ArrayList<>(
expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i4 : l4) {
for (final Integer i5 : l5) {
final List<Tuple5<Integer, Integer, Integer, Integer,
Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
for (final Integer i4: l4) {
for (final Integer i5: l5) {
expected.add(new Tuple5<>(i1, i2, i3, i4, i5));
}
}
......@@ -186,8 +187,8 @@ class CartesianProductTest {
}
}
final List<Tuple5<Integer, Integer, Integer, Integer, Integer>> obtained = new ArrayList<>(
expectedSize);
final List<Tuple5<Integer, Integer, Integer, Integer,
Integer>> obtained = new ArrayList<>(expectedSize);
CartesianProduct.of(l1, l2, l3, l4, l5)
.forEach((i1, i2, i3, i4, i5) -> obtained.add(new Tuple5<>(i1, i2, i3, i4, i5)));
......@@ -205,14 +206,14 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size() * l4.size() * l5.size()
* l6.size();
final List<Tuple6<Integer, Integer, Integer, Integer, Integer, Integer>> expected = new ArrayList<>(
expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i4 : l4) {
for (final Integer i5 : l5) {
for (final Integer i6 : l6) {
final List<Tuple6<Integer, Integer, Integer, Integer, Integer,
Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
for (final Integer i4: l4) {
for (final Integer i5: l5) {
for (final Integer i6: l6) {
expected.add(new Tuple6<>(i1, i2, i3, i4, i5, i6));
}
}
......@@ -221,8 +222,8 @@ class CartesianProductTest {
}
}
final List<Tuple6<Integer, Integer, Integer, Integer, Integer, Integer>> obtained = new ArrayList<>(
expectedSize);
final List<Tuple6<Integer, Integer, Integer, Integer, Integer,
Integer>> obtained = new ArrayList<>(expectedSize);
CartesianProduct.of(l1, l2, l3, l4, l5, l6).forEach(
(i1, i2, i3, i4, i5, i6) -> obtained.add(new Tuple6<>(i1, i2, i3, i4, i5, i6)));
......@@ -241,15 +242,15 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size() * l4.size() * l5.size()
* l6.size() * l7.size();
final List<Tuple7<Integer, Integer, Integer, Integer, Integer, Integer, Integer>> expected = new ArrayList<>(
expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i4 : l4) {
for (final Integer i5 : l5) {
for (final Integer i6 : l6) {
for (final Integer i7 : l7) {
final List<Tuple7<Integer, Integer, Integer, Integer, Integer, Integer,
Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
for (final Integer i4: l4) {
for (final Integer i5: l5) {
for (final Integer i6: l6) {
for (final Integer i7: l7) {
expected.add(new Tuple7<>(i1, i2, i3, i4, i5, i6, i7));
}
}
......@@ -259,8 +260,8 @@ class CartesianProductTest {
}
}
final List<Tuple7<Integer, Integer, Integer, Integer, Integer, Integer, Integer>> obtained = new ArrayList<>(
expectedSize);
final List<Tuple7<Integer, Integer, Integer, Integer, Integer, Integer,
Integer>> obtained = new ArrayList<>(expectedSize);
CartesianProduct.of(l1, l2, l3, l4, l5, l6, l7).forEach((i1, i2, i3, i4, i5, i6,
i7) -> obtained.add(new Tuple7<>(i1, i2, i3, i4, i5, i6, i7)));
......@@ -280,16 +281,16 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size() * l4.size() * l5.size()
* l6.size() * l7.size() * l8.size();
final List<Tuple8<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>> expected = new ArrayList<>(
expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i4 : l4) {
for (final Integer i5 : l5) {
for (final Integer i6 : l6) {
for (final Integer i7 : l7) {
for (final Integer i8 : l8) {
final List<Tuple8<Integer, Integer, Integer, Integer, Integer, Integer, Integer,
Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
for (final Integer i4: l4) {
for (final Integer i5: l5) {
for (final Integer i6: l6) {
for (final Integer i7: l7) {
for (final Integer i8: l8) {
expected.add(new Tuple8<>(i1, i2, i3, i4, i5, i6, i7, i8));
}
}
......@@ -300,15 +301,15 @@ class CartesianProductTest {
}
}
final List<Tuple8<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>> obtained = new ArrayList<>(
expectedSize);
final List<Tuple8<Integer, Integer, Integer, Integer, Integer, Integer, Integer,
Integer>> obtained = new ArrayList<>(expectedSize);
CartesianProduct.of(l1, l2, l3, l4, l5, l6, l7, l8).forEach((i1, i2, i3, i4, i5, i6, i7,
i8) -> obtained.add(new Tuple8<>(i1, i2, i3, i4, i5, i6, i7, i8)));
return expected.equals(obtained);
}
@Property(tries = 30)
@Property(tries = 20)
boolean testOfIterable9ShortList(@ForAll("shortList") final List<Integer> l1,
@ForAll("shortList") final List<Integer> l2,
@ForAll("shortList") final List<Integer> l3,
......@@ -322,17 +323,17 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size() * l4.size() * l5.size()
* l6.size() * l7.size() * l8.size() * l9.size();
final List<Tuple9<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>> expected = new ArrayList<>(
expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i4 : l4) {
for (final Integer i5 : l5) {
for (final Integer i6 : l6) {
for (final Integer i7 : l7) {
for (final Integer i8 : l8) {
for (final Integer i9 : l9) {
final List<Tuple9<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer,
Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
for (final Integer i4: l4) {
for (final Integer i5: l5) {
for (final Integer i6: l6) {
for (final Integer i7: l7) {
for (final Integer i8: l8) {
for (final Integer i9: l9) {
expected.add(new Tuple9<>(i1, i2, i3, i4, i5, i6, i7,
i8, i9));
}
......@@ -345,8 +346,8 @@ class CartesianProductTest {
}
}
final List<Tuple9<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>> obtained = new ArrayList<>(
expectedSize);
final List<Tuple9<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer,
Integer>> obtained = new ArrayList<>(expectedSize);
CartesianProduct.of(l1, l2, l3, l4, l5, l6, l7, l8, l9).forEach((i1, i2, i3, i4, i5, i6, i7,
i8, i9) -> obtained.add(new Tuple9<>(i1, i2, i3, i4, i5, i6, i7, i8, i9)));
......@@ -368,18 +369,18 @@ class CartesianProductTest {
final int expectedSize = l1.size() * l2.size() * l3.size() * l4.size() * l5.size()
* l6.size() * l7.size() * l8.size() * l9.size() * l10.size();
final List<Tuple10<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>> expected = new ArrayList<>(
expectedSize);
for (final Integer i1 : l1) {
for (final Integer i2 : l2) {
for (final Integer i3 : l3) {
for (final Integer i4 : l4) {
for (final Integer i5 : l5) {
for (final Integer i6 : l6) {
for (final Integer i7 : l7) {
for (final Integer i8 : l8) {
for (final Integer i9 : l9) {
for (final Integer i10 : l10) {
final List<Tuple10<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer,
Integer, Integer>> expected = new ArrayList<>(expectedSize);
for (final Integer i1: l1) {
for (final Integer i2: l2) {
for (final Integer i3: l3) {
for (final Integer i4: l4) {
for (final Integer i5: l5) {
for (final Integer i6: l6) {
for (final Integer i7: l7) {
for (final Integer i8: l8) {
for (final Integer i9: l9) {
for (final Integer i10: l10) {
expected.add(new Tuple10<>(i1, i2, i3, i4, i5, i6,
i7, i8, i9, i10));
}
......@@ -393,8 +394,8 @@ class CartesianProductTest {
}
}
final List<Tuple10<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer>> obtained = new ArrayList<>(
expectedSize);
final List<Tuple10<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer,
Integer, Integer>> obtained = new ArrayList<>(expectedSize);
CartesianProduct.of(l1, l2, l3, l4, l5, l6, l7, l8, l9, l10)
.forEach((i1, i2, i3, i4, i5, i6, i7, i8, i9, i10) -> obtained
.add(new Tuple10<>(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10)));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment