You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2018/11/27 13:59:19 UTC
[1/8] groovy git commit: Move tuple improvements to its own project
Repository: groovy
Updated Branches:
refs/heads/master 1606cd5b6 -> 892f67cdc
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/test/groovy/lang/TupleTest.java
----------------------------------------------------------------------
diff --git a/src/test/groovy/lang/TupleTest.java b/src/test/groovy/lang/TupleTest.java
index 9e4e737..8f17fc2 100644
--- a/src/test/groovy/lang/TupleTest.java
+++ b/src/test/groovy/lang/TupleTest.java
@@ -19,30 +19,12 @@
package groovy.lang;
import groovy.util.GroovyTestCase;
-import groovy.util.function.Consumer0;
-import groovy.util.function.Consumer1;
-import groovy.util.function.Consumer2;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
-import java.util.Optional;
import java.util.Set;
-import java.util.TreeSet;
-import java.util.function.BiConsumer;
-import java.util.function.Consumer;
-import java.util.stream.Stream;
-import static groovy.lang.Tuple.collectors;
import static groovy.lang.Tuple.tuple;
-import static java.util.stream.Collectors.averagingInt;
-import static java.util.stream.Collectors.counting;
-import static java.util.stream.Collectors.joining;
-import static java.util.stream.Collectors.mapping;
/**
* @author James Strachan
@@ -351,655 +333,6 @@ public class TupleTest extends GroovyTestCase {
assertFalse(tuple(1, 2, 3).equals(null));
}
- public void testToMap() {
- Map<Integer, Object> m = new LinkedHashMap<>();
- m.put(0, 1);
- m.put(1, "a");
- m.put(2, null);
- assertEquals(m, tuple(1, "a", null).toMap(i -> i));
- }
-
- public void testSwap() {
- assertEquals(tuple(1, "a"), tuple("a", 1).swap());
- assertEquals(tuple(1, "a"), tuple(1, "a").swap().swap());
- }
-
- public void testConcat() {
- assertEquals(tuple(1, "a"), tuple(1).concat("a"));
- assertEquals(tuple(1, "a", 2), tuple(1).concat("a").concat(2));
- assertEquals(tuple(1, "a", 2, "b"), tuple(1).concat("a").concat(2).concat("b"));
- assertEquals(tuple(1, "a", 2, "b", 3), tuple(1).concat("a").concat(2).concat("b").concat(3));
- assertEquals(tuple(1, "a", 2, "b", 3, "c"), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c"));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d"), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d"));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d", 5), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d").concat(5));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d", 5, "e"), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d").concat(5).concat("e"));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d").concat(5).concat("e").concat(6));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6, "f"), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d").concat(5).concat("e").concat(6).concat("f"));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6, "f", 7), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d").concat(5).concat("e").concat(6).concat("f").concat(7));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6, "f", 7, "g"), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d").concat(5).concat("e").concat(6).concat("f").concat(7).concat("g"));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6, "f", 7, "g", 8), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d").concat(5).concat("e").concat(6).concat("f").concat(7).concat("g").concat(8));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d", 5, "e", 6, "f", 7, "g", 8, "h"), tuple(1).concat("a").concat(2).concat("b").concat(3).concat("c").concat(4).concat("d").concat(5).concat("e").concat(6).concat("f").concat(7).concat("g").concat(8).concat("h"));
-
- assertEquals(tuple(1, "a"), tuple(1).concat(tuple("a")));
- assertEquals(tuple(1, "a", 2, "b", 3, "c", 4, "d"), tuple(1).concat(tuple("a", 2, "b").concat(tuple(3).concat(tuple("c", 4, "d")))));
-
- assertEquals(new Integer(136), tuple().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1).concat(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2).concat(tuple(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3).concat(tuple(4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4).concat(tuple(5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5).concat(tuple(6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6).concat(tuple(7, 8, 9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7).concat(tuple(8, 9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8).concat(tuple(9, 10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).concat(tuple(10, 11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).concat(tuple(11, 12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).concat(tuple(12, 13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).concat(tuple(13, 14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).concat(tuple(14, 15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).concat(tuple(15, 16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).concat(tuple(16)).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).concat(tuple()).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
-
- assertEquals(tuple(), tuple().concat(tuple()));
- assertEquals(tuple(1), tuple(1).concat(tuple()));
- assertEquals(tuple(1, 2), tuple(1, 2).concat(tuple()));
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).concat(tuple()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).concat(tuple()));
-
- }
-
- public void testSplitAndConcat() {
- assertEquals(tuple(), tuple().split0().getV1().concat(tuple().split0().getV2()));
-
- assertEquals(tuple(1), tuple(1).split0().getV1().concat(tuple(1).split0().getV2()));
- assertEquals(tuple(1), tuple(1).split1().getV1().concat(tuple(1).split1().getV2()));
-
- assertEquals(tuple(1, 2), tuple(1, 2).split0().getV1().concat(tuple(1, 2).split0().getV2()));
- assertEquals(tuple(1, 2), tuple(1, 2).split1().getV1().concat(tuple(1, 2).split1().getV2()));
- assertEquals(tuple(1, 2), tuple(1, 2).split2().getV1().concat(tuple(1, 2).split2().getV2()));
-
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).split0().getV1().concat(tuple(1, 2, 3).split0().getV2()));
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).split1().getV1().concat(tuple(1, 2, 3).split1().getV2()));
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).split2().getV1().concat(tuple(1, 2, 3).split2().getV2()));
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).split3().getV1().concat(tuple(1, 2, 3).split3().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).split0().getV1().concat(tuple(1, 2, 3, 4).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).split1().getV1().concat(tuple(1, 2, 3, 4).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).split2().getV1().concat(tuple(1, 2, 3, 4).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).split3().getV1().concat(tuple(1, 2, 3, 4).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).split4().getV1().concat(tuple(1, 2, 3, 4).split4().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).split0().getV1().concat(tuple(1, 2, 3, 4, 5).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).split1().getV1().concat(tuple(1, 2, 3, 4, 5).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).split2().getV1().concat(tuple(1, 2, 3, 4, 5).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).split3().getV1().concat(tuple(1, 2, 3, 4, 5).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).split4().getV1().concat(tuple(1, 2, 3, 4, 5).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).split5().getV1().concat(tuple(1, 2, 3, 4, 5).split5().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6).split6().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7).split7().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).split8().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split8().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split9().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).split9().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split8().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split9().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split9().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split10().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).split10().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split8().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split9().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split9().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split10().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split10().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split11().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).split11().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split8().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split9().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split9().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split10().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split10().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split11().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split11().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split12().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).split12().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split8().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split9().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split9().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split10().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split10().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split11().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split11().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split12().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split12().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split13().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).split13().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split8().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split9().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split9().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split10().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split10().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split11().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split11().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split12().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split12().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split13().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split13().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split14().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).split14().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split8().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split9().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split9().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split10().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split10().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split11().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split11().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split12().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split12().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split13().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split13().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split14().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split14().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split15().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).split15().getV2()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split0().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split0().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split1().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split1().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split2().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split2().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split3().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split3().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split4().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split4().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split5().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split5().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split6().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split6().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split7().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split7().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split8().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split8().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split9().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split9().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split10().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split10().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split11().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split11().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split12().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split12().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split13().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split13().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split14().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split14().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split15().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split15().getV2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split16().getV1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).split16().getV2()));
-
- }
-
- public void testLimitAndSkip() {
- assertEquals(tuple(), tuple().limit0().concat(tuple().skip0()));
-
- assertEquals(tuple(1), tuple(1).limit0().concat(tuple(1).skip0()));
- assertEquals(tuple(1), tuple(1).limit1().concat(tuple(1).skip1()));
-
- assertEquals(tuple(1, 2), tuple(1, 2).limit0().concat(tuple(1, 2).skip0()));
- assertEquals(tuple(1, 2), tuple(1, 2).limit1().concat(tuple(1, 2).skip1()));
- assertEquals(tuple(1, 2), tuple(1, 2).limit2().concat(tuple(1, 2).skip2()));
-
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).limit0().concat(tuple(1, 2, 3).skip0()));
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).limit1().concat(tuple(1, 2, 3).skip1()));
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).limit2().concat(tuple(1, 2, 3).skip2()));
- assertEquals(tuple(1, 2, 3), tuple(1, 2, 3).limit3().concat(tuple(1, 2, 3).skip3()));
-
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).limit0().concat(tuple(1, 2, 3, 4).skip0()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).limit1().concat(tuple(1, 2, 3, 4).skip1()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).limit2().concat(tuple(1, 2, 3, 4).skip2()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).limit3().concat(tuple(1, 2, 3, 4).skip3()));
- assertEquals(tuple(1, 2, 3, 4), tuple(1, 2, 3, 4).limit4().concat(tuple(1, 2, 3, 4).skip4()));
-
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).limit0().concat(tuple(1, 2, 3, 4, 5).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).limit1().concat(tuple(1, 2, 3, 4, 5).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).limit2().concat(tuple(1, 2, 3, 4, 5).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).limit3().concat(tuple(1, 2, 3, 4, 5).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).limit4().concat(tuple(1, 2, 3, 4, 5).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5), tuple(1, 2, 3, 4, 5).limit5().concat(tuple(1, 2, 3, 4, 5).skip5()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).limit0().concat(tuple(1, 2, 3, 4, 5, 6).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).limit1().concat(tuple(1, 2, 3, 4, 5, 6).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).limit2().concat(tuple(1, 2, 3, 4, 5, 6).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).limit3().concat(tuple(1, 2, 3, 4, 5, 6).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).limit4().concat(tuple(1, 2, 3, 4, 5, 6).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).limit5().concat(tuple(1, 2, 3, 4, 5, 6).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5, 6).limit6().concat(tuple(1, 2, 3, 4, 5, 6).skip6()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6, 7).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7).skip7()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7, 8).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8).skip8()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip8()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).limit9().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).skip9()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip8()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit9().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip9()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).limit10().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).skip10()));
-
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip8()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit9().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip9()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit10().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip10()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).limit11().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).skip11()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip8()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit9().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip9()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit10().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip10()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit11().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip11()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).limit12().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).skip12()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip8()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit9().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip9()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit10().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip10()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit11().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip11()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit12().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip12()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).limit13().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).skip13()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip8()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit9().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip9()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit10().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip10()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit11().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip11()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit12().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip12()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit13().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip13()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).limit14().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).skip14()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip8()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit9().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip9()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit10().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip10()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit11().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip11()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit12().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip12()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit13().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip13()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit14().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip14()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).limit15().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).skip15()));
-
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit0().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip0()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit1().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip1()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit2().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip2()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit3().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip3()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit4().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip4()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit5().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip5()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit6().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip6()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit7().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip7()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit8().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip8()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit9().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip9()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit10().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip10()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit11().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip11()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit12().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip12()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit13().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip13()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit14().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip14()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit15().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip15()));
- assertEquals(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).limit16().concat(tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).skip16()));
-
- }
-
- public void testCompareTo() {
- Set<Tuple2<Integer, String>> set = new TreeSet<>();
-
- set.add(tuple(2, "a"));
- set.add(tuple(1, "b"));
- set.add(tuple(1, "a"));
- set.add(tuple(2, "a"));
-
- assertEquals(3, set.size());
- assertEquals(Arrays.asList(tuple(1, "a"), tuple(1, "b"), tuple(2, "a")), new ArrayList<>(set));
- }
-
- public void testCompareToWithNulls() {
- Set<Tuple2<Integer, String>> set = new TreeSet<>();
-
- set.add(tuple(2, "a"));
- set.add(tuple(1, "b"));
- set.add(tuple(1, null));
- set.add(tuple(null, "a"));
- set.add(tuple(null, "b"));
- set.add(tuple(null, null));
-
- assertEquals(6, set.size());
- assertEquals(Arrays.asList(tuple(1, "b"), tuple(1, null), tuple(2, "a"), tuple(null, "a"), tuple(null, "b"), tuple(null, null)), new ArrayList<>(set));
- }
-
- public void testIterable() {
- LinkedList<Object> list = new LinkedList<>(tuple(1, "b", null));
- for (Object o : tuple(1, "b", null)) {
- assertEquals(list.poll(), o);
- }
- }
-
- public void testFunctions() {
- assertEquals("[1, b, null]", tuple(1, "b", null).map((v1, v2, v3) -> tuple(v1, v2, v3).toString()));
- assertEquals("1-b", tuple(1, "b", null).map((v1, v2, v3) -> v1 + "-" + v2));
- }
-
- public void testMapN() {
- assertEquals(tuple(1, "a", 2, "b"), tuple(1, null, 2, null).map2(v -> "a").map4(v -> "b"));
- }
-
- public void testOverlaps() {
- assertTrue(Tuple2.overlaps(tuple(1, 3), tuple(1, 3)));
- assertTrue(Tuple2.overlaps(tuple(1, 3), tuple(2, 3)));
- assertTrue(Tuple2.overlaps(tuple(1, 3), tuple(2, 4)));
- assertTrue(Tuple2.overlaps(tuple(1, 3), tuple(3, 4)));
- assertFalse(Tuple2.overlaps(tuple(1, 3), tuple(4, 5)));
- assertFalse(Tuple2.overlaps(tuple(1, 1), tuple(2, 2)));
- }
-
- public void testIntersect() {
- assertEquals(Optional.of(tuple(2, 3)), Tuple2.intersect(tuple(1, 3), tuple(2, 4)));
- assertEquals(Optional.of(tuple(3, 3)), Tuple2.intersect(tuple(1, 3), tuple(3, 5)));
- assertEquals(Optional.empty(), Tuple2.intersect(tuple(1, 3), tuple(4, 5)));
- }
-
- public void testCollectors() {
- assertEquals(
- tuple(3L),
- Stream.of(1, 2, 3)
- .collect(collectors(counting()))
- );
-
- assertEquals(
- tuple(3L, "1, 2, 3"),
- Stream.of(1, 2, 3)
- .collect(collectors(
- counting(),
- mapping(Object::toString, joining(", "))
- ))
- );
-
- assertEquals(
- tuple(3L, "1, 2, 3", 2.0),
- Stream.of(1, 2, 3)
- .collect(collectors(
- counting(),
- mapping(Object::toString, joining(", ")),
- averagingInt(Integer::intValue)
- ))
- );
- }
-
- public void testLimit() {
- assertEquals(
- tuple(),
- tuple(1, "A", 2, "B").limit0()
- );
- assertEquals(
- tuple(1),
- tuple(1, "A", 2, "B").limit1()
- );
- assertEquals(
- tuple(1, "A"),
- tuple(1, "A", 2, "B").limit2()
- );
- assertEquals(
- tuple(1, "A", 2),
- tuple(1, "A", 2, "B").limit3()
- );
- assertEquals(
- tuple(1, "A", 2, "B"),
- tuple(1, "A", 2, "B").limit4()
- );
- }
-
- public void testSkip() {
- assertEquals(
- tuple(),
- tuple(1, "A", 2, "B").skip4()
- );
- assertEquals(
- tuple("B"),
- tuple(1, "A", 2, "B").skip3()
- );
- assertEquals(
- tuple(2, "B"),
- tuple(1, "A", 2, "B").skip2()
- );
- assertEquals(
- tuple("A", 2, "B"),
- tuple(1, "A", 2, "B").skip1()
- );
- assertEquals(
- tuple(1, "A", 2, "B"),
- tuple(1, "A", 2, "B").skip0()
- );
- }
-
- public void testSplit() {
- assertEquals(
- tuple(
- tuple(),
- tuple(1, "A", 2, "B")
- ),
- tuple(1, "A", 2, "B").split0()
- );
- assertEquals(
- tuple(
- tuple(1),
- tuple("A", 2, "B")
- ),
- tuple(1, "A", 2, "B").split1()
- );
- assertEquals(
- tuple(
- tuple(1, "A"),
- new Tuple2<>(2, "B")
- ),
- tuple(1, "A", 2, "B").split2()
- );
- assertEquals(
- tuple(
- tuple(1, "A", 2),
- tuple("B")
- ),
- tuple(1, "A", 2, "B").split3()
- );
- assertEquals(
- tuple(
- tuple(1, "A", 2, "B"),
- tuple()
- ),
- tuple(1, "A", 2, "B").split4()
- );
- }
-
- int result;
- public void testConsumers() {
- Consumer0 c0 = () -> { result = 1; };
- Runnable r = c0.toRunnable();
- Consumer0 c0a = Consumer0.from(r);
-
- result = 0;
- c0.accept();
- assertEquals(1, result);
-
- result = 0;
- c0.accept(Tuple.tuple());
- assertEquals(1, result);
-
- result = 0;
- r.run();
- assertEquals(1, result);
-
- result = 0;
- c0a.accept();
- assertEquals(1, result);
-
- Consumer1<Integer> c1 = i -> { result = i; };
- Consumer<Integer> c1a = c1.toConsumer();
- Consumer1<Integer> c1b = Consumer1.from(c1a);
-
- result = 0;
- c1.accept(1);
- assertEquals(1, result);
-
- result = 0;
- c1.accept(Tuple.tuple(1));
- assertEquals(1, result);
-
- result = 0;
- c1a.accept(1);
- assertEquals(1, result);
-
- result = 0;
- c1b.accept(1);
- assertEquals(1, result);
-
- Consumer2<Integer, Integer> c2 = (i, j) -> { result = i + j; };
- BiConsumer<Integer, Integer> c2a = c2.toBiConsumer();
- Consumer2<Integer, Integer> c2b = Consumer2.from(c2a);
-
- result = 0;
- c2.accept(1, 2);
- assertEquals(3, result);
-
- result = 0;
- c2.accept(Tuple.tuple(1, 2));
- assertEquals(3, result);
-
- result = 0;
- c2a.accept(1, 2);
- assertEquals(3, result);
-
- result = 0;
- c2b.accept(1, 2);
- assertEquals(3, result);
- }
-
public void testGroovyStyleAccessor() {
try {
assertScript("def t = new Tuple1<String>('Daniel'); assert 'Daniel' == t.v1");
@@ -1007,80 +340,4 @@ public class TupleTest extends GroovyTestCase {
assert false: e.getMessage();
}
}
-
- public void testMapAll() {
- assertEquals(tuple(), tuple().mapAll(() -> null));
- assertEquals(tuple(2), tuple(1).mapAll((v1) -> tuple(v1 + 1)));
-
- assertEquals(tuple(2, 3), tuple(1, 2).mapAll((v1, v2) -> tuple(v1 + 1, v2 + 1)));
- assertEquals(tuple(2, 3, 4), tuple(1, 2, 3).mapAll((v1, v2, v3) -> tuple(v1 + 1, v2 + 1, v3 + 1)));
- assertEquals(tuple(2, 3, 4, 5), tuple(1, 2, 3, 4).mapAll((v1, v2, v3, v4) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5).mapAll((v1, v2, v3, v4, v5) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6).mapAll((v1, v2, v3, v4, v5, v6) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7).mapAll((v1, v2, v3, v4, v5, v6, v7) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8).mapAll((v1, v2, v3, v4, v5, v6, v7, v8) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).mapAll((v1, v2, v3, v4, v5, v6, v7, v8, v9) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1, v9 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).mapAll((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1, v9 + 1, v10 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).mapAll((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1, v9 + 1, v10 + 1, v11 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).mapAll((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1, v9 + 1, v10 + 1, v11 + 1, v12 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).mapAll((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1, v9 + 1, v10 + 1, v11 + 1, v12 + 1, v13 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).mapAll((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1, v9 + 1, v10 + 1, v11 + 1, v12 + 1, v13 + 1, v14 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).mapAll((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1, v9 + 1, v10 + 1, v11 + 1, v12 + 1, v13 + 1, v14 + 1, v15 + 1)));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).mapAll((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> tuple(v1 + 1, v2 + 1, v3 + 1, v4 + 1, v5 + 1, v6 + 1, v7 + 1, v8 + 1, v9 + 1, v10 + 1, v11 + 1, v12 + 1, v13 + 1, v14 + 1, v15 + 1, v16 + 1)));
-
- assertEquals(tuple(2,3), tuple(1,2).mapAll(v1 -> v1 + 1, v2 -> v2 + 1));
- assertEquals(tuple(2,3,4), tuple(1,2,3).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1));
- assertEquals(tuple(2,3,4,5), tuple(1,2,3,4).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1));
- assertEquals(tuple(2,3,4,5,6), tuple(1,2,3,4,5).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1));
- assertEquals(tuple(2,3,4,5,6,7), tuple(1,2,3,4,5,6).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8), tuple(1,2,3,4,5,6,7).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9), tuple(1,2,3,4,5,6,7,8).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9,10), tuple(1,2,3,4,5,6,7,8,9).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1, v9 -> v9 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9,10,11), tuple(1,2,3,4,5,6,7,8,9,10).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1, v9 -> v9 + 1, v10 -> v10 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9,10,11,12), tuple(1,2,3,4,5,6,7,8,9,10,11).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1, v9 -> v9 + 1, v10 -> v10 + 1, v11 -> v11 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9,10,11,12,13), tuple(1,2,3,4,5,6,7,8,9,10,11,12).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1, v9 -> v9 + 1, v10 -> v10 + 1, v11 -> v11 + 1, v12 -> v12 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9,10,11,12,13,14), tuple(1,2,3,4,5,6,7,8,9,10,11,12,13).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1, v9 -> v9 + 1, v10 -> v10 + 1, v11 -> v11 + 1, v12 -> v12 + 1, v13 -> v13 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9,10,11,12,13,14,15), tuple(1,2,3,4,5,6,7,8,9,10,11,12,13,14).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1, v9 -> v9 + 1, v10 -> v10 + 1, v11 -> v11 + 1, v12 -> v12 + 1, v13 -> v13 + 1, v14 -> v14 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), tuple(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1, v9 -> v9 + 1, v10 -> v10 + 1, v11 -> v11 + 1, v12 -> v12 + 1, v13 -> v13 + 1, v14 -> v14 + 1, v15 -> v15 + 1));
- assertEquals(tuple(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17), tuple(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16).mapAll(v1 -> v1 + 1, v2 -> v2 + 1, v3 -> v3 + 1, v4 -> v4 + 1, v5 -> v5 + 1, v6 -> v6 + 1, v7 -> v7 + 1, v8 -> v8 + 1, v9 -> v9 + 1, v10 -> v10 + 1, v11 -> v11 + 1, v12 -> v12 + 1, v13 -> v13 + 1, v14 -> v14 + 1, v15 -> v15 + 1, v16 -> v16 + 1));
-
- }
-
- public void testMap() {
- assertEquals(tuple(2), tuple(1).map1(e -> e + 1));
- assertEquals(tuple(2, 3), tuple(1, 2).map1(e -> e + 1).map2(e -> e + 1));
- assertEquals(tuple(2, 3, 4), tuple(1, 2, 3).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5), tuple(1, 2, 3, 4).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6), tuple(1, 2, 3, 4, 5).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7), tuple(1, 2, 3, 4, 5, 6).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8), tuple(1, 2, 3, 4, 5, 6, 7).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9), tuple(1, 2, 3, 4, 5, 6, 7, 8).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1).map9(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1).map9(e -> e + 1).map10(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1).map9(e -> e + 1).map10(e -> e + 1).map11(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1).map9(e -> e + 1).map10(e -> e + 1).map11(e -> e + 1).map12(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1).map9(e -> e + 1).map10(e -> e + 1).map11(e -> e + 1).map12(e -> e + 1).map13(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1).map9(e -> e + 1).map10(e -> e + 1).map11(e -> e + 1).map12(e -> e + 1).map13(e -> e + 1).map14(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1).map9(e -> e + 1).map10(e -> e + 1).map11(e -> e + 1).map12(e -> e + 1).map13(e -> e + 1).map14(e -> e + 1).map15(e -> e + 1));
- assertEquals(tuple(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).map1(e -> e + 1).map2(e -> e + 1).map3(e -> e + 1).map4(e -> e + 1).map5(e -> e + 1).map6(e -> e + 1).map7(e -> e + 1).map8(e -> e + 1).map9(e -> e + 1).map10(e -> e + 1).map11(e -> e + 1).map12(e -> e + 1).map13(e -> e + 1).map14(e -> e + 1).map15(e -> e + 1).map16(e -> e + 1));
-
- assertEquals(new Integer(0), tuple().map(() -> 0));
- assertEquals(new Integer(1), tuple(1).map((v1) -> v1));
- assertEquals(new Integer(3), tuple(1, 2).map((v1, v2) -> v1 + v2));
- assertEquals(new Integer(6), tuple(1, 2, 3).map((v1, v2, v3) -> v1 + v2 + v3));
- assertEquals(new Integer(10), tuple(1, 2, 3, 4).map((v1, v2, v3, v4) -> v1 + v2 + v3 + v4));
- assertEquals(new Integer(15), tuple(1, 2, 3, 4, 5).map((v1, v2, v3, v4, v5) -> v1 + v2 + v3 + v4 + v5));
- assertEquals(new Integer(21), tuple(1, 2, 3, 4, 5, 6).map((v1, v2, v3, v4, v5, v6) -> v1 + v2 + v3 + v4 + v5 + v6));
- assertEquals(new Integer(28), tuple(1, 2, 3, 4, 5, 6, 7).map((v1, v2, v3, v4, v5, v6, v7) -> v1 + v2 + v3 + v4 + v5 + v6 + v7));
- assertEquals(new Integer(36), tuple(1, 2, 3, 4, 5, 6, 7, 8).map((v1, v2, v3, v4, v5, v6, v7, v8) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8));
- assertEquals(new Integer(45), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9).map((v1, v2, v3, v4, v5, v6, v7, v8, v9) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9));
- assertEquals(new Integer(55), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10));
- assertEquals(new Integer(66), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11));
- assertEquals(new Integer(78), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12));
- assertEquals(new Integer(91), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13));
- assertEquals(new Integer(105), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14));
- assertEquals(new Integer(120), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15));
- assertEquals(new Integer(136), tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).map((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15 + v16));
-
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/test/org/codehaus/groovy/runtime/DefaultGroovyStaticMethodsTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/org/codehaus/groovy/runtime/DefaultGroovyStaticMethodsTest.groovy b/src/test/org/codehaus/groovy/runtime/DefaultGroovyStaticMethodsTest.groovy
index daedb24..f19b8c3 100644
--- a/src/test/org/codehaus/groovy/runtime/DefaultGroovyStaticMethodsTest.groovy
+++ b/src/test/org/codehaus/groovy/runtime/DefaultGroovyStaticMethodsTest.groovy
@@ -17,10 +17,6 @@
* under the License.
*/
package org.codehaus.groovy.runtime
-
-import java.util.stream.Collectors
-import java.util.stream.Stream
-
/**
* Tests for DefaultGroovyStaticMethods
*/
@@ -33,20 +29,4 @@ class DefaultGroovyStaticMethodsTest extends GroovyTestCase {
assert timeMillis/1000 as int <= timeSeconds
assert timeMillis2/1000 as int >= timeSeconds
}
-
- void testFirst() {
- assert 2 == Stream.of(2, 3, 6, 5).collect(Collectors.first()).get()
- }
-
- void testLast() {
- assert 5 == Stream.of(2, 3, 6, 5).collect(Collectors.last()).get()
- }
-
- void testFirstAndLast() {
- Tuple2<Integer, Integer> firstAndLastTuple =
- Stream.of(2, 3, 6, 5)
- .collect(Tuple.collectors(Collectors.first(), Collectors.last()))
- .map1(Optional::get).map2(Optional::get)
- assert Tuple.tuple(2, 5) == firstAndLastTuple
- }
}
[5/8] groovy git commit: Move tuple improvements to its own project
Posted by su...@apache.org.
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple6.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple6.java b/src/main/groovy/groovy/lang/Tuple6.java
index 14542d4..04258ff 100644
--- a/src/main/groovy/groovy/lang/Tuple6.java
+++ b/src/main/groovy/groovy/lang/Tuple6.java
@@ -19,9 +19,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function6;
-
/**
* Represents a list of 6 typed Objects.
*
@@ -105,304 +102,4 @@ public final class Tuple6<T1, T2, T3, T4, T5, T6> extends Tuple {
return v6;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(T7 value) {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple0 tuple) {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple1<T7> tuple) {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple2<T7, T8> tuple) {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8, T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple3<T7, T8, T9> tuple) {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8, T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple4<T7, T8, T9, T10> tuple) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8, T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple5<T7, T8, T9, T10, T11> tuple) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8, T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple6<T7, T8, T9, T10, T11, T12> tuple) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8, T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple7<T7, T8, T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8, T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple8<T7, T8, T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8, T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple9<T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple10<T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 6.
- */
- public final Tuple2<Tuple0, Tuple6<T1, T2, T3, T4, T5, T6>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 5.
- */
- public final Tuple2<Tuple1<T1>, Tuple5<T2, T3, T4, T5, T6>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 4.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple4<T3, T4, T5, T6>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 3.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple3<T4, T5, T6>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 2.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple2<T5, T6>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 1.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple1<T6>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 0.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple0> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple5<T2, T3, T4, T5, T6> skip1() {
- return new Tuple5<>(v2, v3, v4, v5, v6);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple4<T3, T4, T5, T6> skip2() {
- return new Tuple4<>(v3, v4, v5, v6);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple3<T4, T5, T6> skip3() {
- return new Tuple3<>(v4, v5, v6);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple2<T5, T6> skip4() {
- return new Tuple2<>(v5, v6);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple1<T6> skip5() {
- return new Tuple1<>(v6);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple0 skip6() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple6<U1, T2, T3, T4, T5, T6> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple6<>(function.apply(v1), v2, v3, v4, v5, v6);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple6<T1, U2, T3, T4, T5, T6> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple6<>(v1, function.apply(v2), v3, v4, v5, v6);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple6<T1, T2, U3, T4, T5, T6> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple6<>(v1, v2, function.apply(v3), v4, v5, v6);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple6<T1, T2, T3, U4, T5, T6> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple6<>(v1, v2, v3, function.apply(v4), v5, v6);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple6<T1, T2, T3, T4, U5, T6> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple6<>(v1, v2, v3, v4, function.apply(v5), v6);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple6<T1, T2, T3, T4, T5, U6> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple6<>(v1, v2, v3, v4, v5, function.apply(v6));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6> Tuple6<U1, U2, U3, U4, U5, U6> mapAll(Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, Tuple6<U1, U2, U3, U4, U5, U6>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6> Tuple6<U1, U2, U3, U4, U5, U6> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6) {
- return new Tuple6<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6));
- }
-
- @Override
- public Tuple6<T1, T2, T3, T4, T5, T6> clone() {
- return new Tuple6<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple7.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple7.java b/src/main/groovy/groovy/lang/Tuple7.java
index ea06599..b609c07 100644
--- a/src/main/groovy/groovy/lang/Tuple7.java
+++ b/src/main/groovy/groovy/lang/Tuple7.java
@@ -19,9 +19,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function7;
-
/**
* Represents a list of 7 typed Objects.
*
@@ -116,327 +113,4 @@ public final class Tuple7<T1, T2, T3, T4, T5, T6, T7> extends Tuple {
return v7;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(T8 value) {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple0 tuple) {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple1<T8> tuple) {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8, T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple2<T8, T9> tuple) {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8, T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple3<T8, T9, T10> tuple) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8, T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple4<T8, T9, T10, T11> tuple) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8, T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple5<T8, T9, T10, T11, T12> tuple) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8, T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple6<T8, T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8, T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple7<T8, T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8, T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple8<T8, T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T8, T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple9<T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 7.
- */
- public final Tuple2<Tuple0, Tuple7<T1, T2, T3, T4, T5, T6, T7>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 6.
- */
- public final Tuple2<Tuple1<T1>, Tuple6<T2, T3, T4, T5, T6, T7>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 5.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple5<T3, T4, T5, T6, T7>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 4.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple4<T4, T5, T6, T7>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 3.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple3<T5, T6, T7>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 2.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple2<T6, T7>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 1.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple1<T7>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 0.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple0> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple6<T2, T3, T4, T5, T6, T7> skip1() {
- return new Tuple6<>(v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple5<T3, T4, T5, T6, T7> skip2() {
- return new Tuple5<>(v3, v4, v5, v6, v7);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple4<T4, T5, T6, T7> skip3() {
- return new Tuple4<>(v4, v5, v6, v7);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple3<T5, T6, T7> skip4() {
- return new Tuple3<>(v5, v6, v7);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple2<T6, T7> skip5() {
- return new Tuple2<>(v6, v7);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple1<T7> skip6() {
- return new Tuple1<>(v7);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple0 skip7() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple7<U1, T2, T3, T4, T5, T6, T7> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple7<>(function.apply(v1), v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple7<T1, U2, T3, T4, T5, T6, T7> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple7<>(v1, function.apply(v2), v3, v4, v5, v6, v7);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple7<T1, T2, U3, T4, T5, T6, T7> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple7<>(v1, v2, function.apply(v3), v4, v5, v6, v7);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple7<T1, T2, T3, U4, T5, T6, T7> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple7<>(v1, v2, v3, function.apply(v4), v5, v6, v7);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple7<T1, T2, T3, T4, U5, T6, T7> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple7<>(v1, v2, v3, v4, function.apply(v5), v6, v7);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple7<T1, T2, T3, T4, T5, U6, T7> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple7<>(v1, v2, v3, v4, v5, function.apply(v6), v7);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple7<T1, T2, T3, T4, T5, T6, U7> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, function.apply(v7));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7> Tuple7<U1, U2, U3, U4, U5, U6, U7> mapAll(Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, Tuple7<U1, U2, U3, U4, U5, U6, U7>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7> Tuple7<U1, U2, U3, U4, U5, U6, U7> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7) {
- return new Tuple7<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7));
- }
-
-
-
- @Override
- public Tuple7<T1, T2, T3, T4, T5, T6, T7> clone() {
- return new Tuple7<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple8.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple8.java b/src/main/groovy/groovy/lang/Tuple8.java
index 35a148e..28caa86 100644
--- a/src/main/groovy/groovy/lang/Tuple8.java
+++ b/src/main/groovy/groovy/lang/Tuple8.java
@@ -19,9 +19,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function8;
-
/**
* Represents a list of 8 typed Objects.
*
@@ -127,346 +124,4 @@ public final class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> extends Tuple {
return v8;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(T9 value) {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple0 tuple) {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple1<T9> tuple) {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple2<T9, T10> tuple) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple3<T9, T10, T11> tuple) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple4<T9, T10, T11, T12> tuple) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple5<T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple6<T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple7<T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple8<T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 8.
- */
- public final Tuple2<Tuple0, Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 7.
- */
- public final Tuple2<Tuple1<T1>, Tuple7<T2, T3, T4, T5, T6, T7, T8>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 6.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple6<T3, T4, T5, T6, T7, T8>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 5.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple5<T4, T5, T6, T7, T8>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 4.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple4<T5, T6, T7, T8>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 3.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple3<T6, T7, T8>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 2.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple2<T7, T8>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 1.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple1<T8>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 0.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple0> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple7<T2, T3, T4, T5, T6, T7, T8> skip1() {
- return new Tuple7<>(v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple6<T3, T4, T5, T6, T7, T8> skip2() {
- return new Tuple6<>(v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple5<T4, T5, T6, T7, T8> skip3() {
- return new Tuple5<>(v4, v5, v6, v7, v8);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple4<T5, T6, T7, T8> skip4() {
- return new Tuple4<>(v5, v6, v7, v8);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple3<T6, T7, T8> skip5() {
- return new Tuple3<>(v6, v7, v8);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple2<T7, T8> skip6() {
- return new Tuple2<>(v7, v8);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple1<T8> skip7() {
- return new Tuple1<>(v8);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple0 skip8() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple8<U1, T2, T3, T4, T5, T6, T7, T8> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple8<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple8<T1, U2, T3, T4, T5, T6, T7, T8> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple8<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple8<T1, T2, U3, T4, T5, T6, T7, T8> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple8<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple8<T1, T2, T3, U4, T5, T6, T7, T8> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple8<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple8<T1, T2, T3, T4, U5, T6, T7, T8> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple8<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple8<T1, T2, T3, T4, T5, U6, T7, T8> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple8<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple8<T1, T2, T3, T4, T5, T6, U7, T8> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple8<T1, T2, T3, T4, T5, T6, T7, U8> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8> Tuple8<U1, U2, U3, U4, U5, U6, U7, U8> mapAll(Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, Tuple8<U1, U2, U3, U4, U5, U6, U7, U8>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8> Tuple8<U1, U2, U3, U4, U5, U6, U7, U8> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8) {
- return new Tuple8<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8));
- }
-
- @Override
- public Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> clone() {
- return new Tuple8<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple9.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple9.java b/src/main/groovy/groovy/lang/Tuple9.java
index 247c845..0af366c 100644
--- a/src/main/groovy/groovy/lang/Tuple9.java
+++ b/src/main/groovy/groovy/lang/Tuple9.java
@@ -20,9 +20,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function9;
-
/**
* Represents a list of 9 typed Objects.
*
@@ -139,367 +136,4 @@ public final class Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> extends Tuple {
return v9;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(T10 value) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple0 tuple) {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple1<T10> tuple) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple2<T10, T11> tuple) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple3<T10, T11, T12> tuple) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple4<T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple5<T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple6<T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple7<T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 9.
- */
- public final Tuple2<Tuple0, Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 8.
- */
- public final Tuple2<Tuple1<T1>, Tuple8<T2, T3, T4, T5, T6, T7, T8, T9>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 7.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple7<T3, T4, T5, T6, T7, T8, T9>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 6.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple6<T4, T5, T6, T7, T8, T9>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 5.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple5<T5, T6, T7, T8, T9>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 4.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple4<T6, T7, T8, T9>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 3.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple3<T7, T8, T9>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 2.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple2<T8, T9>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 1.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple1<T9>> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Split this tuple into two tuples of degree 9 and 0.
- */
- public final Tuple2<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, Tuple0> split9() {
- return new Tuple2<>(limit9(), skip9());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Limit this tuple to degree 9.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> limit9() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple8<T2, T3, T4, T5, T6, T7, T8, T9> skip1() {
- return new Tuple8<>(v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple7<T3, T4, T5, T6, T7, T8, T9> skip2() {
- return new Tuple7<>(v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple6<T4, T5, T6, T7, T8, T9> skip3() {
- return new Tuple6<>(v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple5<T5, T6, T7, T8, T9> skip4() {
- return new Tuple5<>(v5, v6, v7, v8, v9);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple4<T6, T7, T8, T9> skip5() {
- return new Tuple4<>(v6, v7, v8, v9);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple3<T7, T8, T9> skip6() {
- return new Tuple3<>(v7, v8, v9);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple2<T8, T9> skip7() {
- return new Tuple2<>(v8, v9);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple1<T9> skip8() {
- return new Tuple1<>(v9);
- }
-
- /**
- * Skip 9 degrees from this tuple.
- */
- public final Tuple0 skip9() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple9<U1, T2, T3, T4, T5, T6, T7, T8, T9> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple9<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple9<T1, U2, T3, T4, T5, T6, T7, T8, T9> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple9<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple9<T1, T2, U3, T4, T5, T6, T7, T8, T9> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple9<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple9<T1, T2, T3, U4, T5, T6, T7, T8, T9> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple9<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8, v9);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple9<T1, T2, T3, T4, U5, T6, T7, T8, T9> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple9<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8, v9);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple9<T1, T2, T3, T4, T5, U6, T7, T8, T9> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple9<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8, v9);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple9<T1, T2, T3, T4, T5, T6, U7, T8, T9> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8, v9);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple9<T1, T2, T3, T4, T5, T6, T7, U8, T9> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8), v9);
- }
-
- /**
- * Apply attribute 9 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, U9> map9(Function1<? super T9, ? extends U9> function) {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, function.apply(v9));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9> Tuple9<U1, U2, U3, U4, U5, U6, U7, U8, U9> mapAll(Function9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, Tuple9<U1, U2, U3, U4, U5, U6, U7, U8, U9>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9> Tuple9<U1, U2, U3, U4, U5, U6, U7, U8, U9> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8, Function1<? super T9, ? extends U9> function9) {
- return new Tuple9<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8), function9.apply(v9));
- }
-
- @Override
- public Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> clone() {
- return new Tuple9<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer0.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer0.java b/src/main/groovy/groovy/util/function/Consumer0.java
deleted file mode 100644
index b146e9f..0000000
--- a/src/main/groovy/groovy/util/function/Consumer0.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple0;
-
-
-/**
- * A consumer with 0 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer0 extends Runnable {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple0 args) {
- accept();
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept();
-
- @Override
- default void run() {
- accept();
- }
-
- /**
- * Convert this consumer to a {@link Runnable}.
- */
- default Runnable toRunnable() {
- return this::accept;
- }
-
- /**
- * Convert to this consumer from a {@link Runnable}.
- */
- static Consumer0 from(Runnable runnable) {
- return runnable::run;
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer1.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer1.java b/src/main/groovy/groovy/util/function/Consumer1.java
deleted file mode 100644
index 092efa3..0000000
--- a/src/main/groovy/groovy/util/function/Consumer1.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-
-import java.util.function.Consumer;
-
-/**
- * A consumer with 1 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer1<T1> extends Consumer<T1> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple1<? extends T1> args) {
- accept(args.getV1());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- @Override
- void accept(T1 v1);
-
- /**
- * Convert this consumer to a {@link Consumer}.
- */
- default Consumer<T1> toConsumer() {
- return this::accept;
- }
-
- /**
- * Convert to this consumer from a {@link Consumer}.
- */
- static <T1> Consumer1<T1> from(Consumer<? super T1> consumer) {
- return consumer::accept;
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1) {
- return () -> accept(v1);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple1<? extends T1> args) {
- return () -> accept(args.getV1());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer10.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer10.java b/src/main/groovy/groovy/util/function/Consumer10.java
deleted file mode 100644
index bdcd072..0000000
--- a/src/main/groovy/groovy/util/function/Consumer10.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A consumer with 10 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T2, T3, T4, T5, T6, T7, T8, T9, T10> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T3, T4, T5, T6, T7, T8, T9, T10> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T4, T5, T6, T7, T8, T9, T10> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T5, T6, T7, T8, T9, T10> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T6, T7, T8, T9, T10> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T7, T8, T9, T10> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T8, T9, T10> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T9, T10> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T10> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T2, T3, T4, T5, T6, T7, T8, T9, T10> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T3, T4, T5, T6, T7, T8, T9, T10> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T4, T5, T6, T7, T8, T9, T10> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T5, T6, T7, T8, T9, T10> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T6, T7, T8, T9, T10> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T7, T8, T9, T10> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T8, T9, T10> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T9, T10> acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T10> acceptPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer11.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer11.java b/src/main/groovy/groovy/util/function/Consumer11.java
deleted file mode 100644
index 62fa1b3..0000000
--- a/src/main/groovy/groovy/util/function/Consumer11.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A consumer with 11 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T3, T4, T5, T6, T7, T8, T9, T10, T11> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T4, T5, T6, T7, T8, T9, T10, T11> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T5, T6, T7, T8, T9, T10, T11> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T6, T7, T8, T9, T10, T11> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T7, T8, T9, T10, T11> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T8, T9, T10, T11> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T9, T10, T11> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T10, T11> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T11> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T3, T4, T5, T6, T7, T8, T9, T10, T11> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T4, T5, T6, T7, T8, T9, T10, T11> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T5, T6, T7, T8, T9, T10, T11> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T6, T7, T8, T9, T10, T11> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T7, T8, T9, T10, T11> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T8, T9, T10, T11> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T9, T10, T11> acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T10, T11> acceptPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T11> acceptPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer12.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer12.java b/src/main/groovy/groovy/util/function/Consumer12.java
deleted file mode 100644
index 9a6112e..0000000
--- a/src/main/groovy/groovy/util/function/Consumer12.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A consumer with 12 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T4, T5, T6, T7, T8, T9, T10, T11, T12> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T5, T6, T7, T8, T9, T10, T11, T12> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T6, T7, T8, T9, T10, T11, T12> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T7, T8, T9, T10, T11, T12> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T8, T9, T10, T11, T12> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T9, T10, T11, T12> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T10, T11, T12> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T11, T12> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T12> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T4, T5, T6, T7, T8, T9, T10, T11, T12> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T5, T6, T7, T8, T9, T10, T11, T12> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T6, T7, T8, T9, T10, T11, T12> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T7, T8, T9, T10, T11, T12> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T8, T9, T10, T11, T12> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T9, T10, T11, T12> acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T10, T11, T12> acceptPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T11, T12> acceptPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T12> acceptPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12());
- }
-}
[2/8] groovy git commit: Move tuple improvements to its own project
Posted by su...@apache.org.
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function15.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function15.java b/src/main/groovy/groovy/util/function/Function15.java
deleted file mode 100644
index 72d3392..0000000
--- a/src/main/groovy/groovy/util/function/Function15.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple13;
-import groovy.lang.Tuple14;
-import groovy.lang.Tuple15;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A function with 15 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple15<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function13<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function12<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T9, T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T10, T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T11, T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T12, T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12, v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T13, T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return (v13, v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T14, T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13) {
- return (v14, v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T15, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return (v15) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function13<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function12<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T7, T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T8, T9, T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T9, T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T10, T11, T12, T13, T14, T15, R> applyPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T11, T12, T13, T14, T15, R> applyPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T12, T13, T14, T15, R> applyPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12, v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12, v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T13, T14, T15, R> applyPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return (v13, v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), v13, v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T14, T15, R> applyPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return (v14, v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), v14, v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T15, R> applyPartially(Tuple14<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14> args) {
- return (v15) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), v15);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple15<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function16.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function16.java b/src/main/groovy/groovy/util/function/Function16.java
deleted file mode 100644
index c69c8d9..0000000
--- a/src/main/groovy/groovy/util/function/Function16.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple13;
-import groovy.lang.Tuple14;
-import groovy.lang.Tuple15;
-import groovy.lang.Tuple16;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A function with 16 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple16<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15, ? extends T16> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15(), args.getV16());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function14<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function13<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function12<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T10, T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T11, T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T12, T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12, v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T13, T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return (v13, v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T14, T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13) {
- return (v14, v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T15, T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return (v15, v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T16, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
- return (v16) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function14<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function13<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function12<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T12, T13, T14, T15, T16, R> applyPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12, v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12, v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T13, T14, T15, T16, R> applyPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return (v13, v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), v13, v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T14, T15, T16, R> applyPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return (v14, v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), v14, v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T15, T16, R> applyPartially(Tuple14<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14> args) {
- return (v15, v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), v15, v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T16, R> applyPartially(Tuple15<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15> args) {
- return (v16) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15(), v16);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple16<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15, ? extends T16> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15(), args.getV16());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function2.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function2.java b/src/main/groovy/groovy/util/function/Function2.java
deleted file mode 100644
index a59263d..0000000
--- a/src/main/groovy/groovy/util/function/Function2.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-
-import java.util.function.BiFunction;
-
-/**
- * A function with 2 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function2<T1, T2, R> extends BiFunction<T1, T2, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple2<? extends T1, ? extends T2> args) {
- return apply(args.getV1(), args.getV2());
- }
-
- /**
- * Apply this function to the arguments.
- */
- @Override
- R apply(T1 v1, T2 v2);
-
- /**
- * Convert this function to a {@link BiFunction}.
- */
- default BiFunction<T1, T2, R> toBiFunction() {
- return this::apply;
- }
-
- /**
- * Convert to this function from a {@link BiFunction}.
- */
- static <T1, T2, R> Function2<T1, T2, R> from(BiFunction<? super T1, ? super T2, ? extends R> function) {
- return function::apply;
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T2, R> applyPartially(T1 v1) {
- return (v2) -> apply(v1, v2);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2) {
- return () -> apply(v1, v2);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T2, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2) -> apply(args.getV1(), v2);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return () -> apply(args.getV1(), args.getV2());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function3.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function3.java b/src/main/groovy/groovy/util/function/Function3.java
deleted file mode 100644
index 39913a9..0000000
--- a/src/main/groovy/groovy/util/function/Function3.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-
-
-/**
- * A function with 3 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function3<T1, T2, T3, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return apply(args.getV1(), args.getV2(), args.getV3());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T2, T3, R> applyPartially(T1 v1) {
- return (v2, v3) -> apply(v1, v2, v3);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T3, R> applyPartially(T1 v1, T2 v2) {
- return (v3) -> apply(v1, v2, v3);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return () -> apply(v1, v2, v3);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T2, T3, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3) -> apply(args.getV1(), v2, v3);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T3, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3) -> apply(args.getV1(), args.getV2(), v3);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function4.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function4.java b/src/main/groovy/groovy/util/function/Function4.java
deleted file mode 100644
index 4a57349..0000000
--- a/src/main/groovy/groovy/util/function/Function4.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-
-
-/**
- * A function with 4 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function4<T1, T2, T3, T4, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T2, T3, T4, R> applyPartially(T1 v1) {
- return (v2, v3, v4) -> apply(v1, v2, v3, v4);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T3, T4, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4) -> apply(v1, v2, v3, v4);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T4, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4) -> apply(v1, v2, v3, v4);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return () -> apply(v1, v2, v3, v4);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T2, T3, T4, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4) -> apply(args.getV1(), v2, v3, v4);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T3, T4, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4) -> apply(args.getV1(), args.getV2(), v3, v4);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T4, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4) -> apply(args.getV1(), args.getV2(), args.getV3(), v4);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function5.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function5.java b/src/main/groovy/groovy/util/function/Function5.java
deleted file mode 100644
index 1fe0927..0000000
--- a/src/main/groovy/groovy/util/function/Function5.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-
-
-/**
- * A function with 5 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function5<T1, T2, T3, T4, T5, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T2, T3, T4, T5, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5) -> apply(v1, v2, v3, v4, v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T3, T4, T5, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5) -> apply(v1, v2, v3, v4, v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T4, T5, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5) -> apply(v1, v2, v3, v4, v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T5, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5) -> apply(v1, v2, v3, v4, v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return () -> apply(v1, v2, v3, v4, v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T2, T3, T4, T5, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5) -> apply(args.getV1(), v2, v3, v4, v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T3, T4, T5, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5) -> apply(args.getV1(), args.getV2(), v3, v4, v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T4, T5, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T5, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function6.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function6.java b/src/main/groovy/groovy/util/function/Function6.java
deleted file mode 100644
index b88c9d1..0000000
--- a/src/main/groovy/groovy/util/function/Function6.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-
-
-/**
- * A function with 6 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function6<T1, T2, T3, T4, T5, T6, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T2, T3, T4, T5, T6, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6) -> apply(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T3, T4, T5, T6, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6) -> apply(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T4, T5, T6, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6) -> apply(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T5, T6, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6) -> apply(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T6, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6) -> apply(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return () -> apply(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T2, T3, T4, T5, T6, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6) -> apply(args.getV1(), v2, v3, v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T3, T4, T5, T6, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T4, T5, T6, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T5, T6, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T6, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function7.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function7.java b/src/main/groovy/groovy/util/function/Function7.java
deleted file mode 100644
index 94d1de4..0000000
--- a/src/main/groovy/groovy/util/function/Function7.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-
-
-/**
- * A function with 7 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function7<T1, T2, T3, T4, T5, T6, T7, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T2, T3, T4, T5, T6, T7, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7) -> apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T3, T4, T5, T6, T7, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7) -> apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T4, T5, T6, T7, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7) -> apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T5, T6, T7, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7) -> apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T6, T7, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7) -> apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T7, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7) -> apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T2, T3, T4, T5, T6, T7, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T3, T4, T5, T6, T7, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T4, T5, T6, T7, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T5, T6, T7, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T6, T7, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T7, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function8.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function8.java b/src/main/groovy/groovy/util/function/Function8.java
deleted file mode 100644
index 21544bb..0000000
--- a/src/main/groovy/groovy/util/function/Function8.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-
-
-/**
- * A function with 8 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function8<T1, T2, T3, T4, T5, T6, T7, T8, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T2, T3, T4, T5, T6, T7, T8, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8) -> apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T3, T4, T5, T6, T7, T8, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8) -> apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T4, T5, T6, T7, T8, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8) -> apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T5, T6, T7, T8, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8) -> apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T6, T7, T8, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8) -> apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T7, T8, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8) -> apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T8, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8) -> apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T2, T3, T4, T5, T6, T7, T8, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T3, T4, T5, T6, T7, T8, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T4, T5, T6, T7, T8, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T5, T6, T7, T8, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T6, T7, T8, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T7, T8, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T8, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function9.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function9.java b/src/main/groovy/groovy/util/function/Function9.java
deleted file mode 100644
index 59af2bb..0000000
--- a/src/main/groovy/groovy/util/function/Function9.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A function with 9 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T2, T3, T4, T5, T6, T7, T8, T9, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T3, T4, T5, T6, T7, T8, T9, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T4, T5, T6, T7, T8, T9, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T5, T6, T7, T8, T9, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T6, T7, T8, T9, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T7, T8, T9, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T8, T9, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T9, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T2, T3, T4, T5, T6, T7, T8, T9, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T3, T4, T5, T6, T7, T8, T9, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T4, T5, T6, T7, T8, T9, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T5, T6, T7, T8, T9, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T6, T7, T8, T9, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T7, T8, T9, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T8, T9, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T9, R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java
index 0e80157..7d94771 100644
--- a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java
@@ -28,12 +28,9 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
-import java.util.Optional;
import java.util.ResourceBundle;
import java.util.TimeZone;
import java.util.regex.Matcher;
-import java.util.stream.Collector;
-import java.util.stream.Collectors;
/**
* This class defines all the new static groovy methods which appear on normal
@@ -266,24 +263,4 @@ public class DefaultGroovyStaticMethods {
return System.currentTimeMillis() / 1000;
}
- /**
- * Returns a {@link Collector} that gets the first element.
- *
- * @return a {@link Collector} which implements the first operation
- * @since 3.0.0
- */
- public static <T> Collector<T, ?, Optional<T>> first(Collectors self) {
- return Collectors.reducing((v1, v2) -> v1);
- }
-
- /**
- * Returns a {@link Collector} that gets the last element.
- *
- * @return a {@link Collector} which implements the last operation
- * @since 3.0.0
- */
- public static <T> Collector<T, ?, Optional<T>> last(Collectors self) {
- return Collectors.reducing((v1, v2) -> v2);
- }
-
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/test/groovy/bugs/Groovy8887.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/Groovy8887.groovy b/src/test/groovy/bugs/Groovy8887.groovy
index 2335794..e6cdd09 100644
--- a/src/test/groovy/bugs/Groovy8887.groovy
+++ b/src/test/groovy/bugs/Groovy8887.groovy
@@ -38,32 +38,6 @@ class Groovy8887 extends GroovyTestCase {
assert 35 == age
}
- void multiAssignedByMap1() {
- Tuple2<String, Integer> personInfo = new Tuple2<String, Integer>('Daniel', 35)
- def (String name, Integer age) = personInfo.map1(e -> "${e}.Sun")
- assert 'Daniel.Sun' == name
- assert 35 == age
- }
-
- void multiAssignedByMap2() {
- Tuple2<String, Integer> personInfo = new Tuple2<String, Integer>('Daniel', 35)
- def (String name, Integer age) = personInfo.map2(e -> e - 1)
- assert 'Daniel' == name
- assert 34 == age
- }
-
- void multiAssignedByFluentMap1() {
- def (String name, Integer age) = findPersonInfo().map1(e -> "${e}.Sun")
- assert 'Daniel.Sun' == name
- assert 35 == age
- }
-
- void multiAssignedByFluentMap2() {
- def (String name, Integer age) = findPersonInfo().map2(e -> e - 1)
- assert 'Daniel' == name
- assert 34 == age
- }
-
void multiAssignedByFactory() {
def (String name, Integer age) = Tuple.tuple('Daniel', 35)
assert 'Daniel' == name
@@ -86,10 +60,6 @@ class Groovy8887 extends GroovyTestCase {
def st = new StcTuple()
st.multiAssignedByMethodCall()
st.multiAssignedByVariableAccess()
- st.multiAssignedByMap1()
- st.multiAssignedByMap2()
- st.multiAssignedByFluentMap1()
- st.multiAssignedByFluentMap2()
st.multiAssignedByFactory()
st.multiAssignedByConstructor()
'''
[7/8] groovy git commit: Move tuple improvements to its own project
Posted by su...@apache.org.
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple10.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple10.java b/src/main/groovy/groovy/lang/Tuple10.java
index 97b6408..26f3d4e 100644
--- a/src/main/groovy/groovy/lang/Tuple10.java
+++ b/src/main/groovy/groovy/lang/Tuple10.java
@@ -20,9 +20,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function10;
-
/**
* Represents a list of 10 typed Objects.
*
@@ -100,387 +97,4 @@ public final class Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> extends Tupl
return v10;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(T11 value) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple0 tuple) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple1<T11> tuple) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple2<T11, T12> tuple) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple3<T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple4<T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple5<T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple6<T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 10.
- */
- public final Tuple2<Tuple0, Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 9.
- */
- public final Tuple2<Tuple1<T1>, Tuple9<T2, T3, T4, T5, T6, T7, T8, T9, T10>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 8.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple8<T3, T4, T5, T6, T7, T8, T9, T10>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 7.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple7<T4, T5, T6, T7, T8, T9, T10>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 6.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple6<T5, T6, T7, T8, T9, T10>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 5.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple5<T6, T7, T8, T9, T10>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 4.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple4<T7, T8, T9, T10>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 3.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple3<T8, T9, T10>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 2.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple2<T9, T10>> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Split this tuple into two tuples of degree 9 and 1.
- */
- public final Tuple2<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, Tuple1<T10>> split9() {
- return new Tuple2<>(limit9(), skip9());
- }
-
- /**
- * Split this tuple into two tuples of degree 10 and 0.
- */
- public final Tuple2<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, Tuple0> split10() {
- return new Tuple2<>(limit10(), skip10());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Limit this tuple to degree 9.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> limit9() {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Limit this tuple to degree 10.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> limit10() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple9<T2, T3, T4, T5, T6, T7, T8, T9, T10> skip1() {
- return new Tuple9<>(v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple8<T3, T4, T5, T6, T7, T8, T9, T10> skip2() {
- return new Tuple8<>(v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple7<T4, T5, T6, T7, T8, T9, T10> skip3() {
- return new Tuple7<>(v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple6<T5, T6, T7, T8, T9, T10> skip4() {
- return new Tuple6<>(v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple5<T6, T7, T8, T9, T10> skip5() {
- return new Tuple5<>(v6, v7, v8, v9, v10);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple4<T7, T8, T9, T10> skip6() {
- return new Tuple4<>(v7, v8, v9, v10);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple3<T8, T9, T10> skip7() {
- return new Tuple3<>(v8, v9, v10);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple2<T9, T10> skip8() {
- return new Tuple2<>(v9, v10);
- }
-
- /**
- * Skip 9 degrees from this tuple.
- */
- public final Tuple1<T10> skip9() {
- return new Tuple1<>(v10);
- }
-
- /**
- * Skip 10 degrees from this tuple.
- */
- public final Tuple0 skip10() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function10<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple10<U1, T2, T3, T4, T5, T6, T7, T8, T9, T10> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple10<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple10<T1, U2, T3, T4, T5, T6, T7, T8, T9, T10> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple10<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple10<T1, T2, U3, T4, T5, T6, T7, T8, T9, T10> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple10<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple10<T1, T2, T3, U4, T5, T6, T7, T8, T9, T10> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple10<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple10<T1, T2, T3, T4, U5, T6, T7, T8, T9, T10> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple10<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8, v9, v10);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple10<T1, T2, T3, T4, T5, U6, T7, T8, T9, T10> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple10<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8, v9, v10);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple10<T1, T2, T3, T4, T5, T6, U7, T8, T9, T10> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8, v9, v10);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple10<T1, T2, T3, T4, T5, T6, T7, U8, T9, T10> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8), v9, v10);
- }
-
- /**
- * Apply attribute 9 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U9> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, U9, T10> map9(Function1<? super T9, ? extends U9> function) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, function.apply(v9), v10);
- }
-
- /**
- * Apply attribute 10 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, U10> map10(Function1<? super T10, ? extends U10> function) {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, function.apply(v10));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10> Tuple10<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10> mapAll(Function10<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, Tuple10<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10> Tuple10<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8, Function1<? super T9, ? extends U9> function9, Function1<? super T10, ? extends U10> function10) {
- return new Tuple10<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8), function9.apply(v9), function10.apply(v10));
- }
-
- @Override
- public Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> clone() {
- return new Tuple10<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple11.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple11.java b/src/main/groovy/groovy/lang/Tuple11.java
index 04c4133..fbad268 100644
--- a/src/main/groovy/groovy/lang/Tuple11.java
+++ b/src/main/groovy/groovy/lang/Tuple11.java
@@ -20,9 +20,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function11;
-
/**
* Represents a list of 10 typed Objects.
*
@@ -105,409 +102,4 @@ public final class Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> extends
public T11 getV11() {
return v11;
}
-
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(T12 value) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple0 tuple) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple1<T12> tuple) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple2<T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple3<T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple4<T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple5<T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 11.
- */
- public final Tuple2<Tuple0, Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 10.
- */
- public final Tuple2<Tuple1<T1>, Tuple10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 9.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple9<T3, T4, T5, T6, T7, T8, T9, T10, T11>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 8.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple8<T4, T5, T6, T7, T8, T9, T10, T11>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 7.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple7<T5, T6, T7, T8, T9, T10, T11>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 6.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple6<T6, T7, T8, T9, T10, T11>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 5.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple5<T7, T8, T9, T10, T11>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 4.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple4<T8, T9, T10, T11>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 3.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple3<T9, T10, T11>> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Split this tuple into two tuples of degree 9 and 2.
- */
- public final Tuple2<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, Tuple2<T10, T11>> split9() {
- return new Tuple2<>(limit9(), skip9());
- }
-
- /**
- * Split this tuple into two tuples of degree 10 and 1.
- */
- public final Tuple2<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, Tuple1<T11>> split10() {
- return new Tuple2<>(limit10(), skip10());
- }
-
- /**
- * Split this tuple into two tuples of degree 11 and 0.
- */
- public final Tuple2<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, Tuple0> split11() {
- return new Tuple2<>(limit11(), skip11());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Limit this tuple to degree 9.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> limit9() {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Limit this tuple to degree 10.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> limit10() {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Limit this tuple to degree 11.
- */
- public final Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> limit11() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> skip1() {
- return new Tuple10<>(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple9<T3, T4, T5, T6, T7, T8, T9, T10, T11> skip2() {
- return new Tuple9<>(v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple8<T4, T5, T6, T7, T8, T9, T10, T11> skip3() {
- return new Tuple8<>(v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple7<T5, T6, T7, T8, T9, T10, T11> skip4() {
- return new Tuple7<>(v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple6<T6, T7, T8, T9, T10, T11> skip5() {
- return new Tuple6<>(v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple5<T7, T8, T9, T10, T11> skip6() {
- return new Tuple5<>(v7, v8, v9, v10, v11);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple4<T8, T9, T10, T11> skip7() {
- return new Tuple4<>(v8, v9, v10, v11);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple3<T9, T10, T11> skip8() {
- return new Tuple3<>(v9, v10, v11);
- }
-
- /**
- * Skip 9 degrees from this tuple.
- */
- public final Tuple2<T10, T11> skip9() {
- return new Tuple2<>(v10, v11);
- }
-
- /**
- * Skip 10 degrees from this tuple.
- */
- public final Tuple1<T11> skip10() {
- return new Tuple1<>(v11);
- }
-
- /**
- * Skip 11 degrees from this tuple.
- */
- public final Tuple0 skip11() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function11<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple11<U1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple11<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple11<T1, U2, T3, T4, T5, T6, T7, T8, T9, T10, T11> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple11<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple11<T1, T2, U3, T4, T5, T6, T7, T8, T9, T10, T11> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple11<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple11<T1, T2, T3, U4, T5, T6, T7, T8, T9, T10, T11> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple11<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple11<T1, T2, T3, T4, U5, T6, T7, T8, T9, T10, T11> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple11<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple11<T1, T2, T3, T4, T5, U6, T7, T8, T9, T10, T11> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple11<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8, v9, v10, v11);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple11<T1, T2, T3, T4, T5, T6, U7, T8, T9, T10, T11> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8, v9, v10, v11);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple11<T1, T2, T3, T4, T5, T6, T7, U8, T9, T10, T11> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8), v9, v10, v11);
- }
-
- /**
- * Apply attribute 9 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U9> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, U9, T10, T11> map9(Function1<? super T9, ? extends U9> function) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, function.apply(v9), v10, v11);
- }
-
- /**
- * Apply attribute 10 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U10> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, U10, T11> map10(Function1<? super T10, ? extends U10> function) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, function.apply(v10), v11);
- }
-
- /**
- * Apply attribute 11 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, U11> map11(Function1<? super T11, ? extends U11> function) {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, function.apply(v11));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11> Tuple11<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11> mapAll(Function11<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, Tuple11<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11> Tuple11<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8, Function1<? super T9, ? extends U9> function9, Function1<? super T10, ? extends U10> function10, Function1<? super T11, ? extends U11> function11) {
- return new Tuple11<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8), function9.apply(v9), function10.apply(v10), function11.apply(v11));
- }
-
- @Override
- public Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> clone() {
- return new Tuple11<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple12.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple12.java b/src/main/groovy/groovy/lang/Tuple12.java
index b0d83bb..7d0a40b 100644
--- a/src/main/groovy/groovy/lang/Tuple12.java
+++ b/src/main/groovy/groovy/lang/Tuple12.java
@@ -20,9 +20,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function12;
-
/**
* Represents a list of 12 typed Objects.
*
@@ -112,430 +109,4 @@ public final class Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> ex
public T12 getV12() {
return v12;
}
-
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(T13 value) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple0 tuple) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple1<T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple2<T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple3<T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple4<T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 12.
- */
- public final Tuple2<Tuple0, Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 11.
- */
- public final Tuple2<Tuple1<T1>, Tuple11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 10.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 9.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple9<T4, T5, T6, T7, T8, T9, T10, T11, T12>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 8.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple8<T5, T6, T7, T8, T9, T10, T11, T12>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 7.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple7<T6, T7, T8, T9, T10, T11, T12>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 6.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple6<T7, T8, T9, T10, T11, T12>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 5.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple5<T8, T9, T10, T11, T12>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 4.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple4<T9, T10, T11, T12>> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Split this tuple into two tuples of degree 9 and 3.
- */
- public final Tuple2<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, Tuple3<T10, T11, T12>> split9() {
- return new Tuple2<>(limit9(), skip9());
- }
-
- /**
- * Split this tuple into two tuples of degree 10 and 2.
- */
- public final Tuple2<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, Tuple2<T11, T12>> split10() {
- return new Tuple2<>(limit10(), skip10());
- }
-
- /**
- * Split this tuple into two tuples of degree 11 and 1.
- */
- public final Tuple2<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, Tuple1<T12>> split11() {
- return new Tuple2<>(limit11(), skip11());
- }
-
- /**
- * Split this tuple into two tuples of degree 12 and 0.
- */
- public final Tuple2<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, Tuple0> split12() {
- return new Tuple2<>(limit12(), skip12());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Limit this tuple to degree 9.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> limit9() {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Limit this tuple to degree 10.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> limit10() {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Limit this tuple to degree 11.
- */
- public final Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> limit11() {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Limit this tuple to degree 12.
- */
- public final Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> limit12() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> skip1() {
- return new Tuple11<>(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> skip2() {
- return new Tuple10<>(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple9<T4, T5, T6, T7, T8, T9, T10, T11, T12> skip3() {
- return new Tuple9<>(v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple8<T5, T6, T7, T8, T9, T10, T11, T12> skip4() {
- return new Tuple8<>(v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple7<T6, T7, T8, T9, T10, T11, T12> skip5() {
- return new Tuple7<>(v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple6<T7, T8, T9, T10, T11, T12> skip6() {
- return new Tuple6<>(v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple5<T8, T9, T10, T11, T12> skip7() {
- return new Tuple5<>(v8, v9, v10, v11, v12);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple4<T9, T10, T11, T12> skip8() {
- return new Tuple4<>(v9, v10, v11, v12);
- }
-
- /**
- * Skip 9 degrees from this tuple.
- */
- public final Tuple3<T10, T11, T12> skip9() {
- return new Tuple3<>(v10, v11, v12);
- }
-
- /**
- * Skip 10 degrees from this tuple.
- */
- public final Tuple2<T11, T12> skip10() {
- return new Tuple2<>(v11, v12);
- }
-
- /**
- * Skip 11 degrees from this tuple.
- */
- public final Tuple1<T12> skip11() {
- return new Tuple1<>(v12);
- }
-
- /**
- * Skip 12 degrees from this tuple.
- */
- public final Tuple0 skip12() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function12<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple12<U1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple12<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple12<T1, U2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple12<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple12<T1, T2, U3, T4, T5, T6, T7, T8, T9, T10, T11, T12> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple12<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple12<T1, T2, T3, U4, T5, T6, T7, T8, T9, T10, T11, T12> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple12<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple12<T1, T2, T3, T4, U5, T6, T7, T8, T9, T10, T11, T12> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple12<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple12<T1, T2, T3, T4, T5, U6, T7, T8, T9, T10, T11, T12> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple12<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple12<T1, T2, T3, T4, T5, T6, U7, T8, T9, T10, T11, T12> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8, v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple12<T1, T2, T3, T4, T5, T6, T7, U8, T9, T10, T11, T12> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8), v9, v10, v11, v12);
- }
-
- /**
- * Apply attribute 9 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U9> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, U9, T10, T11, T12> map9(Function1<? super T9, ? extends U9> function) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, function.apply(v9), v10, v11, v12);
- }
-
- /**
- * Apply attribute 10 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U10> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, U10, T11, T12> map10(Function1<? super T10, ? extends U10> function) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, function.apply(v10), v11, v12);
- }
-
- /**
- * Apply attribute 11 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U11> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, U11, T12> map11(Function1<? super T11, ? extends U11> function) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, function.apply(v11), v12);
- }
-
- /**
- * Apply attribute 12 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, U12> map12(Function1<? super T12, ? extends U12> function) {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, function.apply(v12));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12> Tuple12<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12> mapAll(Function12<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, Tuple12<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12> Tuple12<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8, Function1<? super T9, ? extends U9> function9, Function1<? super T10, ? extends U10> function10, Function1<? super T11, ? extends U11> function11, Function1<? super T12, ? extends U12> function12) {
- return new Tuple12<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8), function9.apply(v9), function10.apply(v10), function11.apply(v11), function12.apply(v12));
- }
-
- @Override
- public Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> clone() {
- return new Tuple12<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple13.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple13.java b/src/main/groovy/groovy/lang/Tuple13.java
index 2a240d5..fedfd6d 100644
--- a/src/main/groovy/groovy/lang/Tuple13.java
+++ b/src/main/groovy/groovy/lang/Tuple13.java
@@ -20,9 +20,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function13;
-
/**
* Represents a list of 13 typed Objects.
*
@@ -119,450 +116,4 @@ public final class Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T1
return v13;
}
- /**
- * Concatenate a value to this tuple.
- */
- public final <T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(T14 value) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple0 tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple1<T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple2<T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple3<T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 13.
- */
- public final Tuple2<Tuple0, Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 12.
- */
- public final Tuple2<Tuple1<T1>, Tuple12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 11.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple11<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 10.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple10<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 9.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple9<T5, T6, T7, T8, T9, T10, T11, T12, T13>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 8.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple8<T6, T7, T8, T9, T10, T11, T12, T13>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 7.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple7<T7, T8, T9, T10, T11, T12, T13>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 6.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple6<T8, T9, T10, T11, T12, T13>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 5.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple5<T9, T10, T11, T12, T13>> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Split this tuple into two tuples of degree 9 and 4.
- */
- public final Tuple2<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, Tuple4<T10, T11, T12, T13>> split9() {
- return new Tuple2<>(limit9(), skip9());
- }
-
- /**
- * Split this tuple into two tuples of degree 10 and 3.
- */
- public final Tuple2<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, Tuple3<T11, T12, T13>> split10() {
- return new Tuple2<>(limit10(), skip10());
- }
-
- /**
- * Split this tuple into two tuples of degree 11 and 2.
- */
- public final Tuple2<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, Tuple2<T12, T13>> split11() {
- return new Tuple2<>(limit11(), skip11());
- }
-
- /**
- * Split this tuple into two tuples of degree 12 and 1.
- */
- public final Tuple2<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, Tuple1<T13>> split12() {
- return new Tuple2<>(limit12(), skip12());
- }
-
- /**
- * Split this tuple into two tuples of degree 13 and 0.
- */
- public final Tuple2<Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, Tuple0> split13() {
- return new Tuple2<>(limit13(), skip13());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Limit this tuple to degree 9.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> limit9() {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Limit this tuple to degree 10.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> limit10() {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Limit this tuple to degree 11.
- */
- public final Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> limit11() {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Limit this tuple to degree 12.
- */
- public final Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> limit12() {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Limit this tuple to degree 13.
- */
- public final Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> limit13() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> skip1() {
- return new Tuple12<>(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple11<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> skip2() {
- return new Tuple11<>(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple10<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> skip3() {
- return new Tuple10<>(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple9<T5, T6, T7, T8, T9, T10, T11, T12, T13> skip4() {
- return new Tuple9<>(v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple8<T6, T7, T8, T9, T10, T11, T12, T13> skip5() {
- return new Tuple8<>(v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple7<T7, T8, T9, T10, T11, T12, T13> skip6() {
- return new Tuple7<>(v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple6<T8, T9, T10, T11, T12, T13> skip7() {
- return new Tuple6<>(v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple5<T9, T10, T11, T12, T13> skip8() {
- return new Tuple5<>(v9, v10, v11, v12, v13);
- }
-
- /**
- * Skip 9 degrees from this tuple.
- */
- public final Tuple4<T10, T11, T12, T13> skip9() {
- return new Tuple4<>(v10, v11, v12, v13);
- }
-
- /**
- * Skip 10 degrees from this tuple.
- */
- public final Tuple3<T11, T12, T13> skip10() {
- return new Tuple3<>(v11, v12, v13);
- }
-
- /**
- * Skip 11 degrees from this tuple.
- */
- public final Tuple2<T12, T13> skip11() {
- return new Tuple2<>(v12, v13);
- }
-
- /**
- * Skip 12 degrees from this tuple.
- */
- public final Tuple1<T13> skip12() {
- return new Tuple1<>(v13);
- }
-
- /**
- * Skip 13 degrees from this tuple.
- */
- public final Tuple0 skip13() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function13<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? super T13, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple13<U1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple13<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple13<T1, U2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple13<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple13<T1, T2, U3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple13<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple13<T1, T2, T3, U4, T5, T6, T7, T8, T9, T10, T11, T12, T13> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple13<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple13<T1, T2, T3, T4, U5, T6, T7, T8, T9, T10, T11, T12, T13> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple13<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple13<T1, T2, T3, T4, T5, U6, T7, T8, T9, T10, T11, T12, T13> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple13<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple13<T1, T2, T3, T4, T5, T6, U7, T8, T9, T10, T11, T12, T13> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple13<T1, T2, T3, T4, T5, T6, T7, U8, T9, T10, T11, T12, T13> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8), v9, v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 9 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U9> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, U9, T10, T11, T12, T13> map9(Function1<? super T9, ? extends U9> function) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, function.apply(v9), v10, v11, v12, v13);
- }
-
- /**
- * Apply attribute 10 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U10> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, U10, T11, T12, T13> map10(Function1<? super T10, ? extends U10> function) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, function.apply(v10), v11, v12, v13);
- }
-
- /**
- * Apply attribute 11 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U11> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, U11, T12, T13> map11(Function1<? super T11, ? extends U11> function) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, function.apply(v11), v12, v13);
- }
-
- /**
- * Apply attribute 12 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U12> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, U12, T13> map12(Function1<? super T12, ? extends U12> function) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, function.apply(v12), v13);
- }
-
- /**
- * Apply attribute 13 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, U13> map13(Function1<? super T13, ? extends U13> function) {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, function.apply(v13));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13> Tuple13<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13> mapAll(Function13<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? super T13, Tuple13<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13> Tuple13<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8, Function1<? super T9, ? extends U9> function9, Function1<? super T10, ? extends U10> function10, Function1<? super T11, ? extends U11> function11, Function1<? super T12, ? extends U12> function12, Function1<? super T13, ? extends U13> function13) {
- return new Tuple13<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8), function9.apply(v9), function10.apply(v10), function11.apply(v11), function12.apply(v12), function13.apply(v13));
- }
-
- @Override
- public Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> clone() {
- return new Tuple13<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple14.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple14.java b/src/main/groovy/groovy/lang/Tuple14.java
index 934af52..c945545 100644
--- a/src/main/groovy/groovy/lang/Tuple14.java
+++ b/src/main/groovy/groovy/lang/Tuple14.java
@@ -20,9 +20,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function14;
-
/**
* Represents a list of 14 typed Objects.
*
@@ -124,470 +121,4 @@ public final class Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T1
return v14;
}
- /**
- * Concatenate a value to this tuple.
- */
- public final <T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(T15 value) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple0 tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple1<T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple2<T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 14.
- */
- public final Tuple2<Tuple0, Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 13.
- */
- public final Tuple2<Tuple1<T1>, Tuple13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 12.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple12<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 11.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple11<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 10.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple10<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 9.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple9<T6, T7, T8, T9, T10, T11, T12, T13, T14>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 8.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple8<T7, T8, T9, T10, T11, T12, T13, T14>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 7.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple7<T8, T9, T10, T11, T12, T13, T14>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 6.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple6<T9, T10, T11, T12, T13, T14>> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Split this tuple into two tuples of degree 9 and 5.
- */
- public final Tuple2<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, Tuple5<T10, T11, T12, T13, T14>> split9() {
- return new Tuple2<>(limit9(), skip9());
- }
-
- /**
- * Split this tuple into two tuples of degree 10 and 4.
- */
- public final Tuple2<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, Tuple4<T11, T12, T13, T14>> split10() {
- return new Tuple2<>(limit10(), skip10());
- }
-
- /**
- * Split this tuple into two tuples of degree 11 and 3.
- */
- public final Tuple2<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, Tuple3<T12, T13, T14>> split11() {
- return new Tuple2<>(limit11(), skip11());
- }
-
- /**
- * Split this tuple into two tuples of degree 12 and 2.
- */
- public final Tuple2<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, Tuple2<T13, T14>> split12() {
- return new Tuple2<>(limit12(), skip12());
- }
-
- /**
- * Split this tuple into two tuples of degree 13 and 1.
- */
- public final Tuple2<Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, Tuple1<T14>> split13() {
- return new Tuple2<>(limit13(), skip13());
- }
-
- /**
- * Split this tuple into two tuples of degree 14 and 0.
- */
- public final Tuple2<Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, Tuple0> split14() {
- return new Tuple2<>(limit14(), skip14());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Limit this tuple to degree 9.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> limit9() {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Limit this tuple to degree 10.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> limit10() {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Limit this tuple to degree 11.
- */
- public final Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> limit11() {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Limit this tuple to degree 12.
- */
- public final Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> limit12() {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Limit this tuple to degree 13.
- */
- public final Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> limit13() {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Limit this tuple to degree 14.
- */
- public final Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> limit14() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> skip1() {
- return new Tuple13<>(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple12<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> skip2() {
- return new Tuple12<>(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple11<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> skip3() {
- return new Tuple11<>(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple10<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> skip4() {
- return new Tuple10<>(v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple9<T6, T7, T8, T9, T10, T11, T12, T13, T14> skip5() {
- return new Tuple9<>(v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple8<T7, T8, T9, T10, T11, T12, T13, T14> skip6() {
- return new Tuple8<>(v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple7<T8, T9, T10, T11, T12, T13, T14> skip7() {
- return new Tuple7<>(v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple6<T9, T10, T11, T12, T13, T14> skip8() {
- return new Tuple6<>(v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 9 degrees from this tuple.
- */
- public final Tuple5<T10, T11, T12, T13, T14> skip9() {
- return new Tuple5<>(v10, v11, v12, v13, v14);
- }
-
- /**
- * Skip 10 degrees from this tuple.
- */
- public final Tuple4<T11, T12, T13, T14> skip10() {
- return new Tuple4<>(v11, v12, v13, v14);
- }
-
- /**
- * Skip 11 degrees from this tuple.
- */
- public final Tuple3<T12, T13, T14> skip11() {
- return new Tuple3<>(v12, v13, v14);
- }
-
- /**
- * Skip 12 degrees from this tuple.
- */
- public final Tuple2<T13, T14> skip12() {
- return new Tuple2<>(v13, v14);
- }
-
- /**
- * Skip 13 degrees from this tuple.
- */
- public final Tuple1<T14> skip13() {
- return new Tuple1<>(v14);
- }
-
- /**
- * Skip 14 degrees from this tuple.
- */
- public final Tuple0 skip14() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function14<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? super T13, ? super T14, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple14<U1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple14<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple14<T1, U2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple14<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple14<T1, T2, U3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple14<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple14<T1, T2, T3, U4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple14<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple14<T1, T2, T3, T4, U5, T6, T7, T8, T9, T10, T11, T12, T13, T14> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple14<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple14<T1, T2, T3, T4, T5, U6, T7, T8, T9, T10, T11, T12, T13, T14> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple14<T1, T2, T3, T4, T5, T6, U7, T8, T9, T10, T11, T12, T13, T14> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple14<T1, T2, T3, T4, T5, T6, T7, U8, T9, T10, T11, T12, T13, T14> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8), v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 9 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U9> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, U9, T10, T11, T12, T13, T14> map9(Function1<? super T9, ? extends U9> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, function.apply(v9), v10, v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 10 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U10> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, U10, T11, T12, T13, T14> map10(Function1<? super T10, ? extends U10> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, function.apply(v10), v11, v12, v13, v14);
- }
-
- /**
- * Apply attribute 11 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U11> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, U11, T12, T13, T14> map11(Function1<? super T11, ? extends U11> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, function.apply(v11), v12, v13, v14);
- }
-
- /**
- * Apply attribute 12 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U12> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, U12, T13, T14> map12(Function1<? super T12, ? extends U12> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, function.apply(v12), v13, v14);
- }
-
- /**
- * Apply attribute 13 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U13> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, U13, T14> map13(Function1<? super T13, ? extends U13> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, function.apply(v13), v14);
- }
-
- /**
- * Apply attribute 14 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, U14> map14(Function1<? super T14, ? extends U14> function) {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, function.apply(v14));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14> Tuple14<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14> mapAll(Function14<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? super T13, ? super T14, Tuple14<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14> Tuple14<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8, Function1<? super T9, ? extends U9> function9, Function1<? super T10, ? extends U10> function10, Function1<? super T11, ? extends U11> function11, Function1<? super T12, ? extends U12> function12, Function1<? super T13, ? extends U13> function13, Function1<? super T14, ? extends U14> function14) {
- return new Tuple14<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8), function9.apply(v9), function10.apply(v10), function11.apply(v11), function12.apply(v12), function13.apply(v13), function14.apply(v14));
- }
-
- @Override
- public Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> clone() {
- return new Tuple14<>(this);
- }
}
[3/8] groovy git commit: Move tuple improvements to its own project
Posted by su...@apache.org.
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer8.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer8.java b/src/main/groovy/groovy/util/function/Consumer8.java
deleted file mode 100644
index 07f1e40..0000000
--- a/src/main/groovy/groovy/util/function/Consumer8.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-
-
-/**
- * A consumer with 8 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer8<T1, T2, T3, T4, T5, T6, T7, T8> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T2, T3, T4, T5, T6, T7, T8> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8) -> accept(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T3, T4, T5, T6, T7, T8> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8) -> accept(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T4, T5, T6, T7, T8> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8) -> accept(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T5, T6, T7, T8> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8) -> accept(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T6, T7, T8> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8) -> accept(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T7, T8> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8) -> accept(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T8> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8) -> accept(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T2, T3, T4, T5, T6, T7, T8> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T3, T4, T5, T6, T7, T8> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T4, T5, T6, T7, T8> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T5, T6, T7, T8> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T6, T7, T8> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T7, T8> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T8> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer9.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer9.java b/src/main/groovy/groovy/util/function/Consumer9.java
deleted file mode 100644
index f4503c2..0000000
--- a/src/main/groovy/groovy/util/function/Consumer9.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A consumer with 9 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer9<T1, T2, T3, T4, T5, T6, T7, T8, T9> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T2, T3, T4, T5, T6, T7, T8, T9> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T3, T4, T5, T6, T7, T8, T9> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T4, T5, T6, T7, T8, T9> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T5, T6, T7, T8, T9> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T6, T7, T8, T9> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T7, T8, T9> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T8, T9> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T9> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T2, T3, T4, T5, T6, T7, T8, T9> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T3, T4, T5, T6, T7, T8, T9> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T4, T5, T6, T7, T8, T9> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T5, T6, T7, T8, T9> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T6, T7, T8, T9> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T7, T8, T9> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T8, T9> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T9> acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function0.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function0.java b/src/main/groovy/groovy/util/function/Function0.java
deleted file mode 100644
index 4a2a219..0000000
--- a/src/main/groovy/groovy/util/function/Function0.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple0;
-
-import java.util.function.Supplier;
-
-/**
- * A function with 0 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function0<R> extends Supplier<R> {
-
- /**
- * Apply this function to the arguments.
- */
- default R apply() {
- return get();
- }
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple0 args) {
- return get();
- }
-
- /**
- * Apply this function to the arguments.
- */
- @Override
- R get();
-
- /**
- * Convert this function to a {@link Supplier}
- */
- default Supplier<R> toSupplier() {
- return this::apply;
- }
-
- /**
- * Convert to this function from a {@link Supplier}
- */
- static <R> Function0<R> from(Supplier<R> supplier) {
- return supplier::get;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function1.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function1.java b/src/main/groovy/groovy/util/function/Function1.java
deleted file mode 100644
index f439018..0000000
--- a/src/main/groovy/groovy/util/function/Function1.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-
-import java.util.function.Function;
-
-/**
- * A function with 1 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function1<T1, R> extends Function<T1, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple1<? extends T1> args) {
- return apply(args.getV1());
- }
-
- /**
- * Apply this function to the arguments.
- */
- @Override
- R apply(T1 v1);
-
- /**
- * Convert this function to a {@link Function}.
- */
- default Function<T1, R> toFunction() {
- return this::apply;
- }
-
- /**
- * Convert to this function from a {@link Function}.
- */
- static <T1, R> Function1<T1, R> from(Function<? super T1, ? extends R> function) {
- return function::apply;
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1) {
- return () -> apply(v1);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple1<? extends T1> args) {
- return () -> apply(args.getV1());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function10.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function10.java b/src/main/groovy/groovy/util/function/Function10.java
deleted file mode 100644
index d8c9a9f..0000000
--- a/src/main/groovy/groovy/util/function/Function10.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A function with 10 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T2, T3, T4, T5, T6, T7, T8, T9, T10, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T3, T4, T5, T6, T7, T8, T9, T10, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T4, T5, T6, T7, T8, T9, T10, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T5, T6, T7, T8, T9, T10, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T6, T7, T8, T9, T10, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T7, T8, T9, T10, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T8, T9, T10, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T9, T10, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T10, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T2, T3, T4, T5, T6, T7, T8, T9, T10, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T3, T4, T5, T6, T7, T8, T9, T10, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T4, T5, T6, T7, T8, T9, T10, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T5, T6, T7, T8, T9, T10, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T6, T7, T8, T9, T10, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T7, T8, T9, T10, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T8, T9, T10, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T9, T10, R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T10, R> applyPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function11.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function11.java b/src/main/groovy/groovy/util/function/Function11.java
deleted file mode 100644
index 4289c7e..0000000
--- a/src/main/groovy/groovy/util/function/Function11.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A function with 11 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T3, T4, T5, T6, T7, T8, T9, T10, T11, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T4, T5, T6, T7, T8, T9, T10, T11, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T5, T6, T7, T8, T9, T10, T11, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T6, T7, T8, T9, T10, T11, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T7, T8, T9, T10, T11, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T8, T9, T10, T11, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T9, T10, T11, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T10, T11, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T11, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T3, T4, T5, T6, T7, T8, T9, T10, T11, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T4, T5, T6, T7, T8, T9, T10, T11, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T5, T6, T7, T8, T9, T10, T11, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T6, T7, T8, T9, T10, T11, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T7, T8, T9, T10, T11, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T8, T9, T10, T11, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T9, T10, T11, R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T10, T11, R> applyPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T11, R> applyPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function12.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function12.java b/src/main/groovy/groovy/util/function/Function12.java
deleted file mode 100644
index 6f4a305..0000000
--- a/src/main/groovy/groovy/util/function/Function12.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A function with 12 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T4, T5, T6, T7, T8, T9, T10, T11, T12, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T5, T6, T7, T8, T9, T10, T11, T12, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T6, T7, T8, T9, T10, T11, T12, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T7, T8, T9, T10, T11, T12, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T8, T9, T10, T11, T12, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T9, T10, T11, T12, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T10, T11, T12, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T11, T12, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T12, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T4, T5, T6, T7, T8, T9, T10, T11, T12, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T5, T6, T7, T8, T9, T10, T11, T12, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T6, T7, T8, T9, T10, T11, T12, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T7, T8, T9, T10, T11, T12, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T8, T9, T10, T11, T12, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T9, T10, T11, T12, R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T10, T11, T12, R> applyPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T11, T12, R> applyPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T12, R> applyPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function13.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function13.java b/src/main/groovy/groovy/util/function/Function13.java
deleted file mode 100644
index 43a08f5..0000000
--- a/src/main/groovy/groovy/util/function/Function13.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple13;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A function with 13 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T5, T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T7, T8, T9, T10, T11, T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T8, T9, T10, T11, T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T9, T10, T11, T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T10, T11, T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T11, T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T12, T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12, v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T13, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return (v13) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T5, T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T6, T7, T8, T9, T10, T11, T12, T13, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T7, T8, T9, T10, T11, T12, T13, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T8, T9, T10, T11, T12, T13, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T9, T10, T11, T12, T13, R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T10, T11, T12, T13, R> applyPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T11, T12, T13, R> applyPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T12, T13, R> applyPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12, v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12, v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T13, R> applyPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return (v13) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), v13);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Function14.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Function14.java b/src/main/groovy/groovy/util/function/Function14.java
deleted file mode 100644
index 01c5f6d..0000000
--- a/src/main/groovy/groovy/util/function/Function14.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple13;
-import groovy.lang.Tuple14;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A function with 14 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Function14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> {
-
- /**
- * Apply this function to the arguments.
- *
- * @param args The arguments as a tuple.
- */
- default R apply(Tuple14<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14> args) {
- return apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14());
- }
-
- /**
- * Apply this function to the arguments.
- */
- R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14);
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function12<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T8, T9, T10, T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T9, T10, T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T10, T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T11, T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T12, T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12, v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T13, T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return (v13, v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T14, R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13) {
- return (v14) -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return () -> apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function12<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function11<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function10<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function9<T6, T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function8<T7, T8, T9, T10, T11, T12, T13, T14, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function7<T8, T9, T10, T11, T12, T13, T14, R> applyPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function6<T9, T10, T11, T12, T13, T14, R> applyPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function5<T10, T11, T12, T13, T14, R> applyPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function4<T11, T12, T13, T14, R> applyPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function3<T12, T13, T14, R> applyPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12, v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12, v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function2<T13, T14, R> applyPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return (v13, v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), v13, v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function1<T14, R> applyPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return (v14) -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), v14);
- }
-
- /**
- * Partially apply this function to the arguments.
- */
- default Function0<R> applyPartially(Tuple14<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14> args) {
- return () -> apply(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14());
- }
-
-}
[8/8] groovy git commit: Move tuple improvements to its own project
Posted by su...@apache.org.
Move tuple improvements to its own project
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/892f67cd
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/892f67cd
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/892f67cd
Branch: refs/heads/master
Commit: 892f67cdcad9bb2a6c9d1ccf248639f50c50eb29
Parents: 1606cd5
Author: Daniel Sun <su...@apache.org>
Authored: Tue Nov 27 21:58:45 2018 +0800
Committer: Daniel Sun <su...@apache.org>
Committed: Tue Nov 27 21:58:45 2018 +0800
----------------------------------------------------------------------
src/main/groovy/groovy/lang/Tuple.java | 1252 ------------------
src/main/groovy/groovy/lang/Tuple0.java | 171 ---
src/main/groovy/groovy/lang/Tuple1.java | 189 ---
src/main/groovy/groovy/lang/Tuple10.java | 386 ------
src/main/groovy/groovy/lang/Tuple11.java | 408 ------
src/main/groovy/groovy/lang/Tuple12.java | 429 ------
src/main/groovy/groovy/lang/Tuple13.java | 449 -------
src/main/groovy/groovy/lang/Tuple14.java | 469 -------
src/main/groovy/groovy/lang/Tuple15.java | 490 -------
src/main/groovy/groovy/lang/Tuple16.java | 502 -------
src/main/groovy/groovy/lang/Tuple2.java | 248 ----
src/main/groovy/groovy/lang/Tuple3.java | 239 ----
src/main/groovy/groovy/lang/Tuple4.java | 261 ----
src/main/groovy/groovy/lang/Tuple5.java | 282 ----
src/main/groovy/groovy/lang/Tuple6.java | 303 -----
src/main/groovy/groovy/lang/Tuple7.java | 326 -----
src/main/groovy/groovy/lang/Tuple8.java | 345 -----
src/main/groovy/groovy/lang/Tuple9.java | 366 -----
.../groovy/groovy/util/function/Consumer0.java | 64 -
.../groovy/groovy/util/function/Consumer1.java | 75 --
.../groovy/groovy/util/function/Consumer10.java | 194 ---
.../groovy/groovy/util/function/Consumer11.java | 209 ---
.../groovy/groovy/util/function/Consumer12.java | 224 ----
.../groovy/groovy/util/function/Consumer13.java | 239 ----
.../groovy/groovy/util/function/Consumer14.java | 254 ----
.../groovy/groovy/util/function/Consumer15.java | 269 ----
.../groovy/groovy/util/function/Consumer16.java | 284 ----
.../groovy/groovy/util/function/Consumer2.java | 90 --
.../groovy/groovy/util/function/Consumer3.java | 89 --
.../groovy/groovy/util/function/Consumer4.java | 104 --
.../groovy/groovy/util/function/Consumer5.java | 119 --
.../groovy/groovy/util/function/Consumer6.java | 134 --
.../groovy/groovy/util/function/Consumer7.java | 149 ---
.../groovy/groovy/util/function/Consumer8.java | 164 ---
.../groovy/groovy/util/function/Consumer9.java | 179 ---
.../groovy/groovy/util/function/Function0.java | 69 -
.../groovy/groovy/util/function/Function1.java | 75 --
.../groovy/groovy/util/function/Function10.java | 195 ---
.../groovy/groovy/util/function/Function11.java | 210 ---
.../groovy/groovy/util/function/Function12.java | 225 ----
.../groovy/groovy/util/function/Function13.java | 240 ----
.../groovy/groovy/util/function/Function14.java | 255 ----
.../groovy/groovy/util/function/Function15.java | 270 ----
.../groovy/groovy/util/function/Function16.java | 285 ----
.../groovy/groovy/util/function/Function2.java | 91 --
.../groovy/groovy/util/function/Function3.java | 90 --
.../groovy/groovy/util/function/Function4.java | 105 --
.../groovy/groovy/util/function/Function5.java | 120 --
.../groovy/groovy/util/function/Function6.java | 135 --
.../groovy/groovy/util/function/Function7.java | 150 ---
.../groovy/groovy/util/function/Function8.java | 165 ---
.../groovy/groovy/util/function/Function9.java | 180 ---
.../runtime/DefaultGroovyStaticMethods.java | 23 -
src/test/groovy/bugs/Groovy8887.groovy | 30 -
src/test/groovy/lang/TupleTest.java | 743 -----------
.../DefaultGroovyStaticMethodsTest.groovy | 20 -
56 files changed, 13631 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple.java b/src/main/groovy/groovy/lang/Tuple.java
index bd2b34a..30d5bff 100644
--- a/src/main/groovy/groovy/lang/Tuple.java
+++ b/src/main/groovy/groovy/lang/Tuple.java
@@ -18,49 +18,12 @@
*/
package groovy.lang;
-import groovy.util.function.Consumer0;
-import groovy.util.function.Consumer1;
-import groovy.util.function.Consumer10;
-import groovy.util.function.Consumer11;
-import groovy.util.function.Consumer12;
-import groovy.util.function.Consumer13;
-import groovy.util.function.Consumer14;
-import groovy.util.function.Consumer15;
-import groovy.util.function.Consumer16;
-import groovy.util.function.Consumer2;
-import groovy.util.function.Consumer3;
-import groovy.util.function.Consumer4;
-import groovy.util.function.Consumer5;
-import groovy.util.function.Consumer6;
-import groovy.util.function.Consumer7;
-import groovy.util.function.Consumer8;
-import groovy.util.function.Consumer9;
-import groovy.util.function.Function0;
-import groovy.util.function.Function1;
-import groovy.util.function.Function10;
-import groovy.util.function.Function11;
-import groovy.util.function.Function12;
-import groovy.util.function.Function13;
-import groovy.util.function.Function14;
-import groovy.util.function.Function15;
-import groovy.util.function.Function16;
-import groovy.util.function.Function2;
-import groovy.util.function.Function3;
-import groovy.util.function.Function4;
-import groovy.util.function.Function5;
-import groovy.util.function.Function6;
-import groovy.util.function.Function7;
-import groovy.util.function.Function8;
-import groovy.util.function.Function9;
import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
import java.io.Serializable;
import java.util.AbstractList;
-import java.util.LinkedHashMap;
import java.util.List;
-import java.util.Map;
import java.util.Objects;
-import java.util.stream.Collector;
/**
* Represents a list of Objects.
@@ -96,24 +59,6 @@ public class Tuple<E> extends AbstractList<E> implements Serializable, Cloneable
return contents;
}
- /**
- * The degree of this tuple
- */
- public final int degree() {
- return this.size();
- }
-
- public final <K> Map<K, ?> toMap(Function1<? super Integer, ? extends K> keyMapper) {
- Object[] array = toArray();
- Map<K, Object> result = new LinkedHashMap<>();
-
- for (int i = 0, n = array.length; i < n; i++) {
- result.put(keyMapper.apply(i), array[i]);
- }
-
- return result;
- }
-
@SuppressWarnings("unchecked")
@Override
public List<E> subList(int fromIndex, int toIndex) {
@@ -163,11 +108,6 @@ public class Tuple<E> extends AbstractList<E> implements Serializable, Cloneable
return Integer.compare(thisSize, otherSize);
}
- @Override
- public Tuple<E> clone() {
- return new Tuple<>(this);
- }
-
@SuppressWarnings("unchecked")
private static <T> int compare(T t1, T t2) {
return t1 == null && t2 == null
@@ -299,1196 +239,4 @@ public class Tuple<E> extends AbstractList<E> implements Serializable, Cloneable
return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
}
-
- /**
- * Construct a tuple function of degree 0.
- */
- public static <R> Function1<Tuple0, R> function(Function0<R> function) {
- return t -> function.get();
- }
-
- /**
- * Construct a tuple function of degree 1.
- */
- public static <T1, R> Function1<Tuple1<T1>, R> function(Function1<T1, R> function) {
- return t -> function.apply(t.getV1());
- }
-
- /**
- * Construct a tuple function of degree 2.
- */
- public static <T1, T2, R> Function1<Tuple2<T1, T2>, R> function(Function2<T1, T2, R> function) {
- return t -> function.apply(t.getV1(), t.getV2());
- }
-
- /**
- * Construct a tuple function of degree 3.
- */
- public static <T1, T2, T3, R> Function1<Tuple3<T1, T2, T3>, R> function(Function3<T1, T2, T3, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3());
- }
-
- /**
- * Construct a tuple function of degree 4.
- */
- public static <T1, T2, T3, T4, R> Function1<Tuple4<T1, T2, T3, T4>, R> function(Function4<T1, T2, T3, T4, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4());
- }
-
- /**
- * Construct a tuple function of degree 5.
- */
- public static <T1, T2, T3, T4, T5, R> Function1<Tuple5<T1, T2, T3, T4, T5>, R> function(Function5<T1, T2, T3, T4, T5, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5());
- }
-
- /**
- * Construct a tuple function of degree 6.
- */
- public static <T1, T2, T3, T4, T5, T6, R> Function1<Tuple6<T1, T2, T3, T4, T5, T6>, R> function(Function6<T1, T2, T3, T4, T5, T6, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6());
- }
-
- /**
- * Construct a tuple function of degree 7.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, R> Function1<Tuple7<T1, T2, T3, T4, T5, T6, T7>, R> function(Function7<T1, T2, T3, T4, T5, T6, T7, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7());
- }
-
- /**
- * Construct a tuple function of degree 8.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Function1<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, R> function(Function8<T1, T2, T3, T4, T5, T6, T7, T8, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8());
- }
-
- /**
- * Construct a tuple function of degree 9.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Function1<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, R> function(Function9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9());
- }
-
- /**
- * Construct a tuple function of degree 10.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R> Function1<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, R> function(Function10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10());
- }
-
- /**
- * Construct a tuple function of degree 11.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R> Function1<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, R> function(Function11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11());
- }
-
- /**
- * Construct a tuple function of degree 12.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R> Function1<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, R> function(Function12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12());
- }
-
- /**
- * Construct a tuple function of degree 13.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> Function1<Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, R> function(Function13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12(), t.getV13());
- }
-
- /**
- * Construct a tuple function of degree 14.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> Function1<Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, R> function(Function14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12(), t.getV13(), t.getV14());
- }
-
- /**
- * Construct a tuple function of degree 15.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> Function1<Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, R> function(Function15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12(), t.getV13(), t.getV14(), t.getV15());
- }
-
- /**
- * Construct a tuple function of degree 16.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> Function1<Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, R> function(Function16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> function) {
- return t -> function.apply(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12(), t.getV13(), t.getV14(), t.getV15(), t.getV16());
- }
-
-
- /**
- * Construct a tuple consumer of degree 0.
- */
- public static Consumer1<Tuple0> consumer(Consumer0 consumer) {
- return t -> consumer.run();
- }
-
- /**
- * Construct a tuple consumer of degree 1.
- */
- public static <T1> Consumer1<Tuple1<T1>> consumer(Consumer1<T1> consumer) {
- return t -> consumer.accept(t.getV1());
- }
-
- /**
- * Construct a tuple consumer of degree 2.
- */
- public static <T1, T2> Consumer1<Tuple2<T1, T2>> consumer(Consumer2<T1, T2> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2());
- }
-
- /**
- * Construct a tuple consumer of degree 3.
- */
- public static <T1, T2, T3> Consumer1<Tuple3<T1, T2, T3>> consumer(Consumer3<T1, T2, T3> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3());
- }
-
- /**
- * Construct a tuple consumer of degree 4.
- */
- public static <T1, T2, T3, T4> Consumer1<Tuple4<T1, T2, T3, T4>> consumer(Consumer4<T1, T2, T3, T4> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4());
- }
-
- /**
- * Construct a tuple consumer of degree 5.
- */
- public static <T1, T2, T3, T4, T5> Consumer1<Tuple5<T1, T2, T3, T4, T5>> consumer(Consumer5<T1, T2, T3, T4, T5> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5());
- }
-
- /**
- * Construct a tuple consumer of degree 6.
- */
- public static <T1, T2, T3, T4, T5, T6> Consumer1<Tuple6<T1, T2, T3, T4, T5, T6>> consumer(Consumer6<T1, T2, T3, T4, T5, T6> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6());
- }
-
- /**
- * Construct a tuple consumer of degree 7.
- */
- public static <T1, T2, T3, T4, T5, T6, T7> Consumer1<Tuple7<T1, T2, T3, T4, T5, T6, T7>> consumer(Consumer7<T1, T2, T3, T4, T5, T6, T7> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7());
- }
-
- /**
- * Construct a tuple consumer of degree 8.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8> Consumer1<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>> consumer(Consumer8<T1, T2, T3, T4, T5, T6, T7, T8> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8());
- }
-
- /**
- * Construct a tuple consumer of degree 9.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9> Consumer1<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>> consumer(Consumer9<T1, T2, T3, T4, T5, T6, T7, T8, T9> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9());
- }
-
- /**
- * Construct a tuple consumer of degree 10.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Consumer1<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>> consumer(Consumer10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10());
- }
-
- /**
- * Construct a tuple consumer of degree 11.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Consumer1<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>> consumer(Consumer11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11());
- }
-
- /**
- * Construct a tuple consumer of degree 12.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Consumer1<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>> consumer(Consumer12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12());
- }
-
- /**
- * Construct a tuple consumer of degree 13.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Consumer1<Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>> consumer(Consumer13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12(), t.getV13());
- }
-
- /**
- * Construct a tuple consumer of degree 14.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Consumer1<Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>> consumer(Consumer14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12(), t.getV13(), t.getV14());
- }
-
- /**
- * Construct a tuple consumer of degree 15.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Consumer1<Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>> consumer(Consumer15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12(), t.getV13(), t.getV14(), t.getV15());
- }
-
- /**
- * Construct a tuple consumer of degree 16.
- */
- public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Consumer1<Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>> consumer(Consumer16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> consumer) {
- return t -> consumer.accept(t.getV1(), t.getV2(), t.getV3(), t.getV4(), t.getV5(), t.getV6(), t.getV7(), t.getV8(), t.getV9(), t.getV10(), t.getV11(), t.getV12(), t.getV13(), t.getV14(), t.getV15(), t.getV16());
- }
-
- /**
- * Construct a tuple collector of degree 1.
- */
- public static <T, A1, D1> Collector<T, Tuple1<A1>, Tuple1<D1>> collectors(
- Collector<? super T, A1, D1> collector1
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 2.
- */
- public static <T, A1, A2, D1, D2> Collector<T, Tuple2<A1, A2>, Tuple2<D1, D2>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 3.
- */
- public static <T, A1, A2, A3, D1, D2, D3> Collector<T, Tuple3<A1, A2, A3>, Tuple3<D1, D2, D3>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 4.
- */
- public static <T, A1, A2, A3, A4, D1, D2, D3, D4> Collector<T, Tuple4<A1, A2, A3, A4>, Tuple4<D1, D2, D3, D4>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 5.
- */
- public static <T, A1, A2, A3, A4, A5, D1, D2, D3, D4, D5> Collector<T, Tuple5<A1, A2, A3, A4, A5>, Tuple5<D1, D2, D3, D4, D5>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 6.
- */
- public static <T, A1, A2, A3, A4, A5, A6, D1, D2, D3, D4, D5, D6> Collector<T, Tuple6<A1, A2, A3, A4, A5, A6>, Tuple6<D1, D2, D3, D4, D5, D6>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 7.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, D1, D2, D3, D4, D5, D6, D7> Collector<T, Tuple7<A1, A2, A3, A4, A5, A6, A7>, Tuple7<D1, D2, D3, D4, D5, D6, D7>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 8.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, D1, D2, D3, D4, D5, D6, D7, D8> Collector<T, Tuple8<A1, A2, A3, A4, A5, A6, A7, A8>, Tuple8<D1, D2, D3, D4, D5, D6, D7, D8>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 9.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, A9, D1, D2, D3, D4, D5, D6, D7, D8, D9> Collector<T, Tuple9<A1, A2, A3, A4, A5, A6, A7, A8, A9>, Tuple9<D1, D2, D3, D4, D5, D6, D7, D8, D9>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- , Collector<? super T, A9, D9> collector9
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- , collector9.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- collector9.accumulator().accept(a.getV9(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- , collector9.combiner().apply(a1.getV9(), a2.getV9())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- , collector9.finisher().apply(a.getV9())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 10.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10> Collector<T, Tuple10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>, Tuple10<D1, D2, D3, D4, D5, D6, D7, D8, D9, D10>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- , Collector<? super T, A9, D9> collector9
- , Collector<? super T, A10, D10> collector10
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- , collector9.supplier().get()
- , collector10.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- collector9.accumulator().accept(a.getV9(), t);
- collector10.accumulator().accept(a.getV10(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- , collector9.combiner().apply(a1.getV9(), a2.getV9())
- , collector10.combiner().apply(a1.getV10(), a2.getV10())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- , collector9.finisher().apply(a.getV9())
- , collector10.finisher().apply(a.getV10())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 11.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11> Collector<T, Tuple11<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>, Tuple11<D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- , Collector<? super T, A9, D9> collector9
- , Collector<? super T, A10, D10> collector10
- , Collector<? super T, A11, D11> collector11
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- , collector9.supplier().get()
- , collector10.supplier().get()
- , collector11.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- collector9.accumulator().accept(a.getV9(), t);
- collector10.accumulator().accept(a.getV10(), t);
- collector11.accumulator().accept(a.getV11(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- , collector9.combiner().apply(a1.getV9(), a2.getV9())
- , collector10.combiner().apply(a1.getV10(), a2.getV10())
- , collector11.combiner().apply(a1.getV11(), a2.getV11())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- , collector9.finisher().apply(a.getV9())
- , collector10.finisher().apply(a.getV10())
- , collector11.finisher().apply(a.getV11())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 12.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12> Collector<T, Tuple12<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12>, Tuple12<D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- , Collector<? super T, A9, D9> collector9
- , Collector<? super T, A10, D10> collector10
- , Collector<? super T, A11, D11> collector11
- , Collector<? super T, A12, D12> collector12
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- , collector9.supplier().get()
- , collector10.supplier().get()
- , collector11.supplier().get()
- , collector12.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- collector9.accumulator().accept(a.getV9(), t);
- collector10.accumulator().accept(a.getV10(), t);
- collector11.accumulator().accept(a.getV11(), t);
- collector12.accumulator().accept(a.getV12(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- , collector9.combiner().apply(a1.getV9(), a2.getV9())
- , collector10.combiner().apply(a1.getV10(), a2.getV10())
- , collector11.combiner().apply(a1.getV11(), a2.getV11())
- , collector12.combiner().apply(a1.getV12(), a2.getV12())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- , collector9.finisher().apply(a.getV9())
- , collector10.finisher().apply(a.getV10())
- , collector11.finisher().apply(a.getV11())
- , collector12.finisher().apply(a.getV12())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 13.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13> Collector<T, Tuple13<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13>, Tuple13<D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- , Collector<? super T, A9, D9> collector9
- , Collector<? super T, A10, D10> collector10
- , Collector<? super T, A11, D11> collector11
- , Collector<? super T, A12, D12> collector12
- , Collector<? super T, A13, D13> collector13
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- , collector9.supplier().get()
- , collector10.supplier().get()
- , collector11.supplier().get()
- , collector12.supplier().get()
- , collector13.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- collector9.accumulator().accept(a.getV9(), t);
- collector10.accumulator().accept(a.getV10(), t);
- collector11.accumulator().accept(a.getV11(), t);
- collector12.accumulator().accept(a.getV12(), t);
- collector13.accumulator().accept(a.getV13(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- , collector9.combiner().apply(a1.getV9(), a2.getV9())
- , collector10.combiner().apply(a1.getV10(), a2.getV10())
- , collector11.combiner().apply(a1.getV11(), a2.getV11())
- , collector12.combiner().apply(a1.getV12(), a2.getV12())
- , collector13.combiner().apply(a1.getV13(), a2.getV13())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- , collector9.finisher().apply(a.getV9())
- , collector10.finisher().apply(a.getV10())
- , collector11.finisher().apply(a.getV11())
- , collector12.finisher().apply(a.getV12())
- , collector13.finisher().apply(a.getV13())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 14.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14> Collector<T, Tuple14<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14>, Tuple14<D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- , Collector<? super T, A9, D9> collector9
- , Collector<? super T, A10, D10> collector10
- , Collector<? super T, A11, D11> collector11
- , Collector<? super T, A12, D12> collector12
- , Collector<? super T, A13, D13> collector13
- , Collector<? super T, A14, D14> collector14
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- , collector9.supplier().get()
- , collector10.supplier().get()
- , collector11.supplier().get()
- , collector12.supplier().get()
- , collector13.supplier().get()
- , collector14.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- collector9.accumulator().accept(a.getV9(), t);
- collector10.accumulator().accept(a.getV10(), t);
- collector11.accumulator().accept(a.getV11(), t);
- collector12.accumulator().accept(a.getV12(), t);
- collector13.accumulator().accept(a.getV13(), t);
- collector14.accumulator().accept(a.getV14(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- , collector9.combiner().apply(a1.getV9(), a2.getV9())
- , collector10.combiner().apply(a1.getV10(), a2.getV10())
- , collector11.combiner().apply(a1.getV11(), a2.getV11())
- , collector12.combiner().apply(a1.getV12(), a2.getV12())
- , collector13.combiner().apply(a1.getV13(), a2.getV13())
- , collector14.combiner().apply(a1.getV14(), a2.getV14())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- , collector9.finisher().apply(a.getV9())
- , collector10.finisher().apply(a.getV10())
- , collector11.finisher().apply(a.getV11())
- , collector12.finisher().apply(a.getV12())
- , collector13.finisher().apply(a.getV13())
- , collector14.finisher().apply(a.getV14())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 15.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15> Collector<T, Tuple15<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15>, Tuple15<D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- , Collector<? super T, A9, D9> collector9
- , Collector<? super T, A10, D10> collector10
- , Collector<? super T, A11, D11> collector11
- , Collector<? super T, A12, D12> collector12
- , Collector<? super T, A13, D13> collector13
- , Collector<? super T, A14, D14> collector14
- , Collector<? super T, A15, D15> collector15
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- , collector9.supplier().get()
- , collector10.supplier().get()
- , collector11.supplier().get()
- , collector12.supplier().get()
- , collector13.supplier().get()
- , collector14.supplier().get()
- , collector15.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- collector9.accumulator().accept(a.getV9(), t);
- collector10.accumulator().accept(a.getV10(), t);
- collector11.accumulator().accept(a.getV11(), t);
- collector12.accumulator().accept(a.getV12(), t);
- collector13.accumulator().accept(a.getV13(), t);
- collector14.accumulator().accept(a.getV14(), t);
- collector15.accumulator().accept(a.getV15(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- , collector9.combiner().apply(a1.getV9(), a2.getV9())
- , collector10.combiner().apply(a1.getV10(), a2.getV10())
- , collector11.combiner().apply(a1.getV11(), a2.getV11())
- , collector12.combiner().apply(a1.getV12(), a2.getV12())
- , collector13.combiner().apply(a1.getV13(), a2.getV13())
- , collector14.combiner().apply(a1.getV14(), a2.getV14())
- , collector15.combiner().apply(a1.getV15(), a2.getV15())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- , collector9.finisher().apply(a.getV9())
- , collector10.finisher().apply(a.getV10())
- , collector11.finisher().apply(a.getV11())
- , collector12.finisher().apply(a.getV12())
- , collector13.finisher().apply(a.getV13())
- , collector14.finisher().apply(a.getV14())
- , collector15.finisher().apply(a.getV15())
- )
- );
- }
-
- /**
- * Construct a tuple collector of degree 16.
- */
- public static <T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15, D16> Collector<T, Tuple16<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16>, Tuple16<D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15, D16>> collectors(
- Collector<? super T, A1, D1> collector1
- , Collector<? super T, A2, D2> collector2
- , Collector<? super T, A3, D3> collector3
- , Collector<? super T, A4, D4> collector4
- , Collector<? super T, A5, D5> collector5
- , Collector<? super T, A6, D6> collector6
- , Collector<? super T, A7, D7> collector7
- , Collector<? super T, A8, D8> collector8
- , Collector<? super T, A9, D9> collector9
- , Collector<? super T, A10, D10> collector10
- , Collector<? super T, A11, D11> collector11
- , Collector<? super T, A12, D12> collector12
- , Collector<? super T, A13, D13> collector13
- , Collector<? super T, A14, D14> collector14
- , Collector<? super T, A15, D15> collector15
- , Collector<? super T, A16, D16> collector16
- ) {
- return Collector.of(
- () -> tuple(
- collector1.supplier().get()
- , collector2.supplier().get()
- , collector3.supplier().get()
- , collector4.supplier().get()
- , collector5.supplier().get()
- , collector6.supplier().get()
- , collector7.supplier().get()
- , collector8.supplier().get()
- , collector9.supplier().get()
- , collector10.supplier().get()
- , collector11.supplier().get()
- , collector12.supplier().get()
- , collector13.supplier().get()
- , collector14.supplier().get()
- , collector15.supplier().get()
- , collector16.supplier().get()
- ),
- (a, t) -> {
- collector1.accumulator().accept(a.getV1(), t);
- collector2.accumulator().accept(a.getV2(), t);
- collector3.accumulator().accept(a.getV3(), t);
- collector4.accumulator().accept(a.getV4(), t);
- collector5.accumulator().accept(a.getV5(), t);
- collector6.accumulator().accept(a.getV6(), t);
- collector7.accumulator().accept(a.getV7(), t);
- collector8.accumulator().accept(a.getV8(), t);
- collector9.accumulator().accept(a.getV9(), t);
- collector10.accumulator().accept(a.getV10(), t);
- collector11.accumulator().accept(a.getV11(), t);
- collector12.accumulator().accept(a.getV12(), t);
- collector13.accumulator().accept(a.getV13(), t);
- collector14.accumulator().accept(a.getV14(), t);
- collector15.accumulator().accept(a.getV15(), t);
- collector16.accumulator().accept(a.getV16(), t);
- },
- (a1, a2) -> tuple(
- collector1.combiner().apply(a1.getV1(), a2.getV1())
- , collector2.combiner().apply(a1.getV2(), a2.getV2())
- , collector3.combiner().apply(a1.getV3(), a2.getV3())
- , collector4.combiner().apply(a1.getV4(), a2.getV4())
- , collector5.combiner().apply(a1.getV5(), a2.getV5())
- , collector6.combiner().apply(a1.getV6(), a2.getV6())
- , collector7.combiner().apply(a1.getV7(), a2.getV7())
- , collector8.combiner().apply(a1.getV8(), a2.getV8())
- , collector9.combiner().apply(a1.getV9(), a2.getV9())
- , collector10.combiner().apply(a1.getV10(), a2.getV10())
- , collector11.combiner().apply(a1.getV11(), a2.getV11())
- , collector12.combiner().apply(a1.getV12(), a2.getV12())
- , collector13.combiner().apply(a1.getV13(), a2.getV13())
- , collector14.combiner().apply(a1.getV14(), a2.getV14())
- , collector15.combiner().apply(a1.getV15(), a2.getV15())
- , collector16.combiner().apply(a1.getV16(), a2.getV16())
- ),
- a -> tuple(
- collector1.finisher().apply(a.getV1())
- , collector2.finisher().apply(a.getV2())
- , collector3.finisher().apply(a.getV3())
- , collector4.finisher().apply(a.getV4())
- , collector5.finisher().apply(a.getV5())
- , collector6.finisher().apply(a.getV6())
- , collector7.finisher().apply(a.getV7())
- , collector8.finisher().apply(a.getV8())
- , collector9.finisher().apply(a.getV9())
- , collector10.finisher().apply(a.getV10())
- , collector11.finisher().apply(a.getV11())
- , collector12.finisher().apply(a.getV12())
- , collector13.finisher().apply(a.getV13())
- , collector14.finisher().apply(a.getV14())
- , collector15.finisher().apply(a.getV15())
- , collector16.finisher().apply(a.getV16())
- )
- );
- }
-
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple0.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple0.java b/src/main/groovy/groovy/lang/Tuple0.java
index c7c4d9c..4901d79 100644
--- a/src/main/groovy/groovy/lang/Tuple0.java
+++ b/src/main/groovy/groovy/lang/Tuple0.java
@@ -18,8 +18,6 @@
*/
package groovy.lang;
-import groovy.util.function.Function0;
-
/**
* Represents a list of 0 typed Object.
*
@@ -31,173 +29,4 @@ public final class Tuple0 extends Tuple {
private Tuple0() {}
- /**
- * Concatenate a value to this tuple.
- */
- public final <T1> Tuple1<T1> concat(T1 value) {
- return new Tuple1<>(value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple0 concat(Tuple0 tuple) {
- return INSTANCE;
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1> Tuple1<T1> concat(Tuple1<T1> tuple) {
- return new Tuple1<>(tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2> Tuple2<T1, T2> concat(Tuple2<T1, T2> tuple) {
- return new Tuple2<>(tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3> Tuple3<T1, T2, T3> concat(Tuple3<T1, T2, T3> tuple) {
- return new Tuple3<>(tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4> Tuple4<T1, T2, T3, T4> concat(Tuple4<T1, T2, T3, T4> tuple) {
- return new Tuple4<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5> Tuple5<T1, T2, T3, T4, T5> concat(Tuple5<T1, T2, T3, T4, T5> tuple) {
- return new Tuple5<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6> Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple6<T1, T2, T3, T4, T5, T6> tuple) {
- return new Tuple6<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple7<T1, T2, T3, T4, T5, T6, T7> tuple) {
- return new Tuple7<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> tuple) {
- return new Tuple8<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8, T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> tuple) {
- return new Tuple9<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> tuple) {
- return new Tuple10<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> tuple) {
- return new Tuple11<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> tuple) {
- return new Tuple12<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13(), tuple.getV14());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13(), tuple.getV14(), tuple.getV15());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13(), tuple.getV14(), tuple.getV15(), tuple.getV16());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 0.
- */
- public final Tuple2<Tuple0, Tuple0> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple0 skip0() {
- return this;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function0<? extends R> function) {
- return function.apply();
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <R> Tuple0 mapAll(Function0<? extends R> function) {
- if (null != function) {
- function.apply();
- }
-
- return INSTANCE;
- }
-
- @Override
- public Tuple0 clone() {
- return INSTANCE;
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple1.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple1.java b/src/main/groovy/groovy/lang/Tuple1.java
index bef131c..e628e89 100644
--- a/src/main/groovy/groovy/lang/Tuple1.java
+++ b/src/main/groovy/groovy/lang/Tuple1.java
@@ -18,8 +18,6 @@
*/
package groovy.lang;
-import groovy.util.function.Function1;
-
/**
* Represents a list of 1 typed Object.
*
@@ -47,191 +45,4 @@ public final class Tuple1<T1> extends Tuple {
public T1 getV1() {
return v1;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T2> Tuple2<T1, T2> concat(T2 value) {
- return new Tuple2<>(v1, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple1<T1> concat(Tuple0 tuple) {
- return new Tuple1<>(v1);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2> Tuple2<T1, T2> concat(Tuple1<T2> tuple) {
- return new Tuple2<>(v1, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3> Tuple3<T1, T2, T3> concat(Tuple2<T2, T3> tuple) {
- return new Tuple3<>(v1, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4> Tuple4<T1, T2, T3, T4> concat(Tuple3<T2, T3, T4> tuple) {
- return new Tuple4<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5> Tuple5<T1, T2, T3, T4, T5> concat(Tuple4<T2, T3, T4, T5> tuple) {
- return new Tuple5<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6> Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple5<T2, T3, T4, T5, T6> tuple) {
- return new Tuple6<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple6<T2, T3, T4, T5, T6, T7> tuple) {
- return new Tuple7<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple7<T2, T3, T4, T5, T6, T7, T8> tuple) {
- return new Tuple8<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8, T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple8<T2, T3, T4, T5, T6, T7, T8, T9> tuple) {
- return new Tuple9<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8, T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple9<T2, T3, T4, T5, T6, T7, T8, T9, T10> tuple) {
- return new Tuple10<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> tuple) {
- return new Tuple11<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> tuple) {
- return new Tuple12<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13(), tuple.getV14());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13(), tuple.getV14(), tuple.getV15());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 1.
- */
- public final Tuple2<Tuple0, Tuple1<T1>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 0.
- */
- public final Tuple2<Tuple1<T1>, Tuple0> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple1<T1> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple0 skip1() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function1<? super T1, ? extends R> function) {
- return function.apply(v1);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple1<U1> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple1<>(function.apply(v1));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1> Tuple1<U1> mapAll(Function1<? super T1, Tuple1<U1>> function) {
- return function.apply(v1);
- }
-
- @Override
- public Tuple1<T1> clone() {
- return new Tuple1<>(this);
- }
}
[4/8] groovy git commit: Move tuple improvements to its own project
Posted by su...@apache.org.
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer13.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer13.java b/src/main/groovy/groovy/util/function/Consumer13.java
deleted file mode 100644
index d032a3b..0000000
--- a/src/main/groovy/groovy/util/function/Consumer13.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple13;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A consumer with 13 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T5, T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T7, T8, T9, T10, T11, T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T8, T9, T10, T11, T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T9, T10, T11, T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T10, T11, T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T11, T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T12, T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12, v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T13> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return (v13) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T5, T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T6, T7, T8, T9, T10, T11, T12, T13> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T7, T8, T9, T10, T11, T12, T13> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T8, T9, T10, T11, T12, T13> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T9, T10, T11, T12, T13> acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T10, T11, T12, T13> acceptPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T11, T12, T13> acceptPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T12, T13> acceptPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12, v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12, v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T13> acceptPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return (v13) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), v13);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer14.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer14.java b/src/main/groovy/groovy/util/function/Consumer14.java
deleted file mode 100644
index d0ce07b..0000000
--- a/src/main/groovy/groovy/util/function/Consumer14.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple13;
-import groovy.lang.Tuple14;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A consumer with 14 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple14<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer12<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T8, T9, T10, T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T9, T10, T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T10, T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T11, T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T12, T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12, v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T13, T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return (v13, v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T14> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13) {
- return (v14) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer12<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T6, T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T7, T8, T9, T10, T11, T12, T13, T14> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T8, T9, T10, T11, T12, T13, T14> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T9, T10, T11, T12, T13, T14> acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T10, T11, T12, T13, T14> acceptPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T11, T12, T13, T14> acceptPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T12, T13, T14> acceptPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12, v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12, v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T13, T14> acceptPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return (v13, v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), v13, v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T14> acceptPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return (v14) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), v14);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple14<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer15.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer15.java b/src/main/groovy/groovy/util/function/Consumer15.java
deleted file mode 100644
index f41095e..0000000
--- a/src/main/groovy/groovy/util/function/Consumer15.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple13;
-import groovy.lang.Tuple14;
-import groovy.lang.Tuple15;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A consumer with 15 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple15<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer13<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer12<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T9, T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T10, T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T11, T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T12, T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12, v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T13, T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return (v13, v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T14, T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13) {
- return (v14, v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T15> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return (v15) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer13<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer12<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T7, T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T8, T9, T10, T11, T12, T13, T14, T15> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T9, T10, T11, T12, T13, T14, T15> acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T10, T11, T12, T13, T14, T15> acceptPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T11, T12, T13, T14, T15> acceptPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T12, T13, T14, T15> acceptPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12, v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12, v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T13, T14, T15> acceptPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return (v13, v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), v13, v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T14, T15> acceptPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return (v14, v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), v14, v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T15> acceptPartially(Tuple14<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14> args) {
- return (v15) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), v15);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple15<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer16.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer16.java b/src/main/groovy/groovy/util/function/Consumer16.java
deleted file mode 100644
index 60533f9..0000000
--- a/src/main/groovy/groovy/util/function/Consumer16.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple10;
-import groovy.lang.Tuple11;
-import groovy.lang.Tuple12;
-import groovy.lang.Tuple13;
-import groovy.lang.Tuple14;
-import groovy.lang.Tuple15;
-import groovy.lang.Tuple16;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-import groovy.lang.Tuple8;
-import groovy.lang.Tuple9;
-
-
-/**
- * A consumer with 16 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple16<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15, ? extends T16> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15(), args.getV16());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer14<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer13<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer12<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return (v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
- return (v9, v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T10, T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
- return (v10, v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T11, T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
- return (v11, v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T12, T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11) {
- return (v12, v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T13, T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12) {
- return (v13, v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T14, T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13) {
- return (v14, v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T15, T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
- return (v15, v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T16> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
- return (v16) -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer14<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer13<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer12<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer11<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer10<T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer9<T8, T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return (v8, v9, v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer8<T9, T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple8<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8> args) {
- return (v9, v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer7<T10, T11, T12, T13, T14, T15, T16> acceptPartially(Tuple9<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9> args) {
- return (v10, v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T11, T12, T13, T14, T15, T16> acceptPartially(Tuple10<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10> args) {
- return (v11, v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T12, T13, T14, T15, T16> acceptPartially(Tuple11<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11> args) {
- return (v12, v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), v12, v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T13, T14, T15, T16> acceptPartially(Tuple12<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12> args) {
- return (v13, v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), v13, v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T14, T15, T16> acceptPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
- return (v14, v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), v14, v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T15, T16> acceptPartially(Tuple14<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14> args) {
- return (v15, v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), v15, v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T16> acceptPartially(Tuple15<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15> args) {
- return (v16) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15(), v16);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple16<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13, ? extends T14, ? extends T15, ? extends T16> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7(), args.getV8(), args.getV9(), args.getV10(), args.getV11(), args.getV12(), args.getV13(), args.getV14(), args.getV15(), args.getV16());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer2.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer2.java b/src/main/groovy/groovy/util/function/Consumer2.java
deleted file mode 100644
index c43e512..0000000
--- a/src/main/groovy/groovy/util/function/Consumer2.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-
-import java.util.function.BiConsumer;
-
-/**
- * A consumer with 2 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer2<T1, T2> extends BiConsumer<T1, T2> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple2<? extends T1, ? extends T2> args) {
- accept(args.getV1(), args.getV2());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- @Override
- void accept(T1 v1, T2 v2);
-
- /**
- * Convert this consumer to a {@link BiConsumer}.
- */
- default BiConsumer<T1, T2> toBiConsumer() {
- return this::accept;
- }
-
- /**
- * Convert to this consumer to a {@link BiConsumer}.
- */
- static <T1, T2> Consumer2<T1, T2> from(BiConsumer<? super T1, ? super T2> consumer) {
- return consumer::accept;
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T2> acceptPartially(T1 v1) {
- return (v2) -> accept(v1, v2);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2) {
- return () -> accept(v1, v2);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T2> acceptPartially(Tuple1<? extends T1> args) {
- return (v2) -> accept(args.getV1(), v2);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return () -> accept(args.getV1(), args.getV2());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer3.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer3.java b/src/main/groovy/groovy/util/function/Consumer3.java
deleted file mode 100644
index 3411a0f..0000000
--- a/src/main/groovy/groovy/util/function/Consumer3.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-
-
-/**
- * A consumer with 3 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer3<T1, T2, T3> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- accept(args.getV1(), args.getV2(), args.getV3());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T2, T3> acceptPartially(T1 v1) {
- return (v2, v3) -> accept(v1, v2, v3);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T3> acceptPartially(T1 v1, T2 v2) {
- return (v3) -> accept(v1, v2, v3);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3) {
- return () -> accept(v1, v2, v3);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T2, T3> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3) -> accept(args.getV1(), v2, v3);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T3> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3) -> accept(args.getV1(), args.getV2(), v3);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer4.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer4.java b/src/main/groovy/groovy/util/function/Consumer4.java
deleted file mode 100644
index 234a32e..0000000
--- a/src/main/groovy/groovy/util/function/Consumer4.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-
-
-/**
- * A consumer with 4 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer4<T1, T2, T3, T4> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T2, T3, T4> acceptPartially(T1 v1) {
- return (v2, v3, v4) -> accept(v1, v2, v3, v4);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T3, T4> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4) -> accept(v1, v2, v3, v4);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T4> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4) -> accept(v1, v2, v3, v4);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return () -> accept(v1, v2, v3, v4);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T2, T3, T4> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4) -> accept(args.getV1(), v2, v3, v4);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T3, T4> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4) -> accept(args.getV1(), args.getV2(), v3, v4);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T4> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4) -> accept(args.getV1(), args.getV2(), args.getV3(), v4);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer5.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer5.java b/src/main/groovy/groovy/util/function/Consumer5.java
deleted file mode 100644
index 0a155cb..0000000
--- a/src/main/groovy/groovy/util/function/Consumer5.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-
-
-/**
- * A consumer with 5 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer5<T1, T2, T3, T4, T5> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T2, T3, T4, T5> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5) -> accept(v1, v2, v3, v4, v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T3, T4, T5> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5) -> accept(v1, v2, v3, v4, v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T4, T5> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5) -> accept(v1, v2, v3, v4, v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T5> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5) -> accept(v1, v2, v3, v4, v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return () -> accept(v1, v2, v3, v4, v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T2, T3, T4, T5> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5) -> accept(args.getV1(), v2, v3, v4, v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T3, T4, T5> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5) -> accept(args.getV1(), args.getV2(), v3, v4, v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T4, T5> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T5> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer6.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer6.java b/src/main/groovy/groovy/util/function/Consumer6.java
deleted file mode 100644
index 2bb13c0..0000000
--- a/src/main/groovy/groovy/util/function/Consumer6.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-
-
-/**
- * A consumer with 6 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer6<T1, T2, T3, T4, T5, T6> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T2, T3, T4, T5, T6> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6) -> accept(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T3, T4, T5, T6> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6) -> accept(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T4, T5, T6> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6) -> accept(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T5, T6> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6) -> accept(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T6> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6) -> accept(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return () -> accept(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T2, T3, T4, T5, T6> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6) -> accept(args.getV1(), v2, v3, v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T3, T4, T5, T6> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T4, T5, T6> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T5, T6> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T6> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6());
- }
-}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/util/function/Consumer7.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/util/function/Consumer7.java b/src/main/groovy/groovy/util/function/Consumer7.java
deleted file mode 100644
index 05b4632..0000000
--- a/src/main/groovy/groovy/util/function/Consumer7.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package groovy.util.function;
-
-import groovy.lang.Tuple1;
-import groovy.lang.Tuple2;
-import groovy.lang.Tuple3;
-import groovy.lang.Tuple4;
-import groovy.lang.Tuple5;
-import groovy.lang.Tuple6;
-import groovy.lang.Tuple7;
-
-
-/**
- * A consumer with 7 arguments.
- *
- * @since 3.0.0
- */
-@FunctionalInterface
-public interface Consumer7<T1, T2, T3, T4, T5, T6, T7> {
-
- /**
- * Performs this operation on the given argument.
- *
- * @param args The arguments as a tuple.
- */
- default void accept(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7());
- }
-
- /**
- * Performs this operation on the given argument.
- */
- void accept(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7);
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T2, T3, T4, T5, T6, T7> acceptPartially(T1 v1) {
- return (v2, v3, v4, v5, v6, v7) -> accept(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T3, T4, T5, T6, T7> acceptPartially(T1 v1, T2 v2) {
- return (v3, v4, v5, v6, v7) -> accept(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T4, T5, T6, T7> acceptPartially(T1 v1, T2 v2, T3 v3) {
- return (v4, v5, v6, v7) -> accept(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T5, T6, T7> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4) {
- return (v5, v6, v7) -> accept(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T6, T7> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) {
- return (v6, v7) -> accept(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T7> acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) {
- return (v7) -> accept(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) {
- return () -> accept(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer6<T2, T3, T4, T5, T6, T7> acceptPartially(Tuple1<? extends T1> args) {
- return (v2, v3, v4, v5, v6, v7) -> accept(args.getV1(), v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer5<T3, T4, T5, T6, T7> acceptPartially(Tuple2<? extends T1, ? extends T2> args) {
- return (v3, v4, v5, v6, v7) -> accept(args.getV1(), args.getV2(), v3, v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer4<T4, T5, T6, T7> acceptPartially(Tuple3<? extends T1, ? extends T2, ? extends T3> args) {
- return (v4, v5, v6, v7) -> accept(args.getV1(), args.getV2(), args.getV3(), v4, v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer3<T5, T6, T7> acceptPartially(Tuple4<? extends T1, ? extends T2, ? extends T3, ? extends T4> args) {
- return (v5, v6, v7) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), v5, v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer2<T6, T7> acceptPartially(Tuple5<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5> args) {
- return (v6, v7) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), v6, v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer1<T7> acceptPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) {
- return (v7) -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), v7);
- }
-
- /**
- * Let this consumer partially accept the arguments.
- */
- default Consumer0 acceptPartially(Tuple7<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7> args) {
- return () -> accept(args.getV1(), args.getV2(), args.getV3(), args.getV4(), args.getV5(), args.getV6(), args.getV7());
- }
-}
[6/8] groovy git commit: Move tuple improvements to its own project
Posted by su...@apache.org.
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple15.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple15.java b/src/main/groovy/groovy/lang/Tuple15.java
index b995753..5589d77 100644
--- a/src/main/groovy/groovy/lang/Tuple15.java
+++ b/src/main/groovy/groovy/lang/Tuple15.java
@@ -20,9 +20,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function15;
-
/**
* Represents a list of 15 typed Objects.
*
@@ -130,491 +127,4 @@ public final class Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T1
return v15;
}
- /**
- * Concatenate a value to this tuple.
- */
- public final <T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(T16 value) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple0 tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple1<T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, tuple.getV1());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 15.
- */
- public final Tuple2<Tuple0, Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 14.
- */
- public final Tuple2<Tuple1<T1>, Tuple14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 13.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple13<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 12.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple12<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 11.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple11<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 10.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple10<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 9.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple9<T7, T8, T9, T10, T11, T12, T13, T14, T15>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 8.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple8<T8, T9, T10, T11, T12, T13, T14, T15>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 7.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple7<T9, T10, T11, T12, T13, T14, T15>> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Split this tuple into two tuples of degree 9 and 6.
- */
- public final Tuple2<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, Tuple6<T10, T11, T12, T13, T14, T15>> split9() {
- return new Tuple2<>(limit9(), skip9());
- }
-
- /**
- * Split this tuple into two tuples of degree 10 and 5.
- */
- public final Tuple2<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, Tuple5<T11, T12, T13, T14, T15>> split10() {
- return new Tuple2<>(limit10(), skip10());
- }
-
- /**
- * Split this tuple into two tuples of degree 11 and 4.
- */
- public final Tuple2<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, Tuple4<T12, T13, T14, T15>> split11() {
- return new Tuple2<>(limit11(), skip11());
- }
-
- /**
- * Split this tuple into two tuples of degree 12 and 3.
- */
- public final Tuple2<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, Tuple3<T13, T14, T15>> split12() {
- return new Tuple2<>(limit12(), skip12());
- }
-
- /**
- * Split this tuple into two tuples of degree 13 and 2.
- */
- public final Tuple2<Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, Tuple2<T14, T15>> split13() {
- return new Tuple2<>(limit13(), skip13());
- }
-
- /**
- * Split this tuple into two tuples of degree 14 and 1.
- */
- public final Tuple2<Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, Tuple1<T15>> split14() {
- return new Tuple2<>(limit14(), skip14());
- }
-
- /**
- * Split this tuple into two tuples of degree 15 and 0.
- */
- public final Tuple2<Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, Tuple0> split15() {
- return new Tuple2<>(limit15(), skip15());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Limit this tuple to degree 9.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> limit9() {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Limit this tuple to degree 10.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> limit10() {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Limit this tuple to degree 11.
- */
- public final Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> limit11() {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Limit this tuple to degree 12.
- */
- public final Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> limit12() {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Limit this tuple to degree 13.
- */
- public final Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> limit13() {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Limit this tuple to degree 14.
- */
- public final Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> limit14() {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Limit this tuple to degree 15.
- */
- public final Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> limit15() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> skip1() {
- return new Tuple14<>(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple13<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> skip2() {
- return new Tuple13<>(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple12<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> skip3() {
- return new Tuple12<>(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple11<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> skip4() {
- return new Tuple11<>(v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple10<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> skip5() {
- return new Tuple10<>(v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple9<T7, T8, T9, T10, T11, T12, T13, T14, T15> skip6() {
- return new Tuple9<>(v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple8<T8, T9, T10, T11, T12, T13, T14, T15> skip7() {
- return new Tuple8<>(v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple7<T9, T10, T11, T12, T13, T14, T15> skip8() {
- return new Tuple7<>(v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 9 degrees from this tuple.
- */
- public final Tuple6<T10, T11, T12, T13, T14, T15> skip9() {
- return new Tuple6<>(v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 10 degrees from this tuple.
- */
- public final Tuple5<T11, T12, T13, T14, T15> skip10() {
- return new Tuple5<>(v11, v12, v13, v14, v15);
- }
-
- /**
- * Skip 11 degrees from this tuple.
- */
- public final Tuple4<T12, T13, T14, T15> skip11() {
- return new Tuple4<>(v12, v13, v14, v15);
- }
-
- /**
- * Skip 12 degrees from this tuple.
- */
- public final Tuple3<T13, T14, T15> skip12() {
- return new Tuple3<>(v13, v14, v15);
- }
-
- /**
- * Skip 13 degrees from this tuple.
- */
- public final Tuple2<T14, T15> skip13() {
- return new Tuple2<>(v14, v15);
- }
-
- /**
- * Skip 14 degrees from this tuple.
- */
- public final Tuple1<T15> skip14() {
- return new Tuple1<>(v15);
- }
-
- /**
- * Skip 15 degrees from this tuple.
- */
- public final Tuple0 skip15() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function15<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? super T13, ? super T14, ? super T15, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple15<U1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple15<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple15<T1, U2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple15<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple15<T1, T2, U3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple15<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple15<T1, T2, T3, U4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple15<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple15<T1, T2, T3, T4, U5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple15<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple15<T1, T2, T3, T4, T5, U6, T7, T8, T9, T10, T11, T12, T13, T14, T15> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple15<T1, T2, T3, T4, T5, T6, U7, T8, T9, T10, T11, T12, T13, T14, T15> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple15<T1, T2, T3, T4, T5, T6, T7, U8, T9, T10, T11, T12, T13, T14, T15> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8), v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 9 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U9> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, U9, T10, T11, T12, T13, T14, T15> map9(Function1<? super T9, ? extends U9> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, function.apply(v9), v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 10 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U10> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, U10, T11, T12, T13, T14, T15> map10(Function1<? super T10, ? extends U10> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, function.apply(v10), v11, v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 11 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U11> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, U11, T12, T13, T14, T15> map11(Function1<? super T11, ? extends U11> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, function.apply(v11), v12, v13, v14, v15);
- }
-
- /**
- * Apply attribute 12 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U12> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, U12, T13, T14, T15> map12(Function1<? super T12, ? extends U12> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, function.apply(v12), v13, v14, v15);
- }
-
- /**
- * Apply attribute 13 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U13> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, U13, T14, T15> map13(Function1<? super T13, ? extends U13> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, function.apply(v13), v14, v15);
- }
-
- /**
- * Apply attribute 14 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U14> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, U14, T15> map14(Function1<? super T14, ? extends U14> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, function.apply(v14), v15);
- }
-
- /**
- * Apply attribute 15 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, U15> map15(Function1<? super T15, ? extends U15> function) {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, function.apply(v15));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15> Tuple15<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15> mapAll(Function15<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? super T13, ? super T14, ? super T15, Tuple15<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15> Tuple15<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8, Function1<? super T9, ? extends U9> function9, Function1<? super T10, ? extends U10> function10, Function1<? super T11, ? extends U11> function11, Function1<? super T12, ? extends U12> function12, Function1<? super T13, ? extends U13> function13, Function1<? super T14, ? extends U14> function14, Function1<? super T15, ? extends U15> function15) {
- return new Tuple15<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8), function9.apply(v9), function10.apply(v10), function11.apply(v11), function12.apply(v12), function13.apply(v13), function14.apply(v14), function15.apply(v15));
- }
-
- @Override
- public Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> clone() {
- return new Tuple15<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple16.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple16.java b/src/main/groovy/groovy/lang/Tuple16.java
index bcc8cc8..3cbecce 100644
--- a/src/main/groovy/groovy/lang/Tuple16.java
+++ b/src/main/groovy/groovy/lang/Tuple16.java
@@ -20,9 +20,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function16;
-
/**
* Represents a list of 16 typed Objects.
*
@@ -135,503 +132,4 @@ public final class Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T1
public T16 getV16() {
return v16;
}
-
- public final Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple0 tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 16.
- */
- public final Tuple2<Tuple0, Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 15.
- */
- public final Tuple2<Tuple1<T1>, Tuple15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 14.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple14<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 13.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple13<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 12.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple12<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 11.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple11<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Split this tuple into two tuples of degree 6 and 10.
- */
- public final Tuple2<Tuple6<T1, T2, T3, T4, T5, T6>, Tuple10<T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>> split6() {
- return new Tuple2<>(limit6(), skip6());
- }
-
- /**
- * Split this tuple into two tuples of degree 7 and 9.
- */
- public final Tuple2<Tuple7<T1, T2, T3, T4, T5, T6, T7>, Tuple9<T8, T9, T10, T11, T12, T13, T14, T15, T16>> split7() {
- return new Tuple2<>(limit7(), skip7());
- }
-
- /**
- * Split this tuple into two tuples of degree 8 and 8.
- */
- public final Tuple2<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, Tuple8<T9, T10, T11, T12, T13, T14, T15, T16>> split8() {
- return new Tuple2<>(limit8(), skip8());
- }
-
- /**
- * Split this tuple into two tuples of degree 9 and 7.
- */
- public final Tuple2<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>, Tuple7<T10, T11, T12, T13, T14, T15, T16>> split9() {
- return new Tuple2<>(limit9(), skip9());
- }
-
- /**
- * Split this tuple into two tuples of degree 10 and 6.
- */
- public final Tuple2<Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, Tuple6<T11, T12, T13, T14, T15, T16>> split10() {
- return new Tuple2<>(limit10(), skip10());
- }
-
- /**
- * Split this tuple into two tuples of degree 11 and 5.
- */
- public final Tuple2<Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, Tuple5<T12, T13, T14, T15, T16>> split11() {
- return new Tuple2<>(limit11(), skip11());
- }
-
- /**
- * Split this tuple into two tuples of degree 12 and 4.
- */
- public final Tuple2<Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, Tuple4<T13, T14, T15, T16>> split12() {
- return new Tuple2<>(limit12(), skip12());
- }
-
- /**
- * Split this tuple into two tuples of degree 13 and 3.
- */
- public final Tuple2<Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, Tuple3<T14, T15, T16>> split13() {
- return new Tuple2<>(limit13(), skip13());
- }
-
- /**
- * Split this tuple into two tuples of degree 14 and 2.
- */
- public final Tuple2<Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, Tuple2<T15, T16>> split14() {
- return new Tuple2<>(limit14(), skip14());
- }
-
- /**
- * Split this tuple into two tuples of degree 15 and 1.
- */
- public final Tuple2<Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, Tuple1<T16>> split15() {
- return new Tuple2<>(limit15(), skip15());
- }
-
- /**
- * Split this tuple into two tuples of degree 16 and 0.
- */
- public final Tuple2<Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, Tuple0> split16() {
- return new Tuple2<>(limit16(), skip16());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Limit this tuple to degree 6.
- */
- public final Tuple6<T1, T2, T3, T4, T5, T6> limit6() {
- return new Tuple6<>(v1, v2, v3, v4, v5, v6);
- }
-
- /**
- * Limit this tuple to degree 7.
- */
- public final Tuple7<T1, T2, T3, T4, T5, T6, T7> limit7() {
- return new Tuple7<>(v1, v2, v3, v4, v5, v6, v7);
- }
-
- /**
- * Limit this tuple to degree 8.
- */
- public final Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> limit8() {
- return new Tuple8<>(v1, v2, v3, v4, v5, v6, v7, v8);
- }
-
- /**
- * Limit this tuple to degree 9.
- */
- public final Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> limit9() {
- return new Tuple9<>(v1, v2, v3, v4, v5, v6, v7, v8, v9);
- }
-
- /**
- * Limit this tuple to degree 10.
- */
- public final Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> limit10() {
- return new Tuple10<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);
- }
-
- /**
- * Limit this tuple to degree 11.
- */
- public final Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> limit11() {
- return new Tuple11<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
- }
-
- /**
- * Limit this tuple to degree 12.
- */
- public final Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> limit12() {
- return new Tuple12<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
- }
-
- /**
- * Limit this tuple to degree 13.
- */
- public final Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> limit13() {
- return new Tuple13<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
- }
-
- /**
- * Limit this tuple to degree 14.
- */
- public final Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> limit14() {
- return new Tuple14<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);
- }
-
- /**
- * Limit this tuple to degree 15.
- */
- public final Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> limit15() {
- return new Tuple15<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15);
- }
-
- /**
- * Limit this tuple to degree 16.
- */
- public final Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> limit16() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> skip1() {
- return new Tuple15<>(v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple14<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> skip2() {
- return new Tuple14<>(v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple13<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> skip3() {
- return new Tuple13<>(v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple12<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> skip4() {
- return new Tuple12<>(v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple11<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> skip5() {
- return new Tuple11<>(v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 6 degrees from this tuple.
- */
- public final Tuple10<T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> skip6() {
- return new Tuple10<>(v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 7 degrees from this tuple.
- */
- public final Tuple9<T8, T9, T10, T11, T12, T13, T14, T15, T16> skip7() {
- return new Tuple9<>(v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 8 degrees from this tuple.
- */
- public final Tuple8<T9, T10, T11, T12, T13, T14, T15, T16> skip8() {
- return new Tuple8<>(v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 9 degrees from this tuple.
- */
- public final Tuple7<T10, T11, T12, T13, T14, T15, T16> skip9() {
- return new Tuple7<>(v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 10 degrees from this tuple.
- */
- public final Tuple6<T11, T12, T13, T14, T15, T16> skip10() {
- return new Tuple6<>(v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 11 degrees from this tuple.
- */
- public final Tuple5<T12, T13, T14, T15, T16> skip11() {
- return new Tuple5<>(v12, v13, v14, v15, v16);
- }
-
- /**
- * Skip 12 degrees from this tuple.
- */
- public final Tuple4<T13, T14, T15, T16> skip12() {
- return new Tuple4<>(v13, v14, v15, v16);
- }
-
- /**
- * Skip 13 degrees from this tuple.
- */
- public final Tuple3<T14, T15, T16> skip13() {
- return new Tuple3<>(v14, v15, v16);
- }
-
- /**
- * Skip 14 degrees from this tuple.
- */
- public final Tuple2<T15, T16> skip14() {
- return new Tuple2<>(v15, v16);
- }
-
- /**
- * Skip 15 degrees from this tuple.
- */
- public final Tuple1<T16> skip15() {
- return new Tuple1<>(v16);
- }
-
- /**
- * Skip 16 degrees from this tuple.
- */
- public final Tuple0 skip16() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function16<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? super T13, ? super T14, ? super T15, ? super T16, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple16<U1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple16<>(function.apply(v1), v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple16<T1, U2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple16<>(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple16<T1, T2, U3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple16<>(v1, v2, function.apply(v3), v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple16<T1, T2, T3, U4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple16<>(v1, v2, v3, function.apply(v4), v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple16<T1, T2, T3, T4, U5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple16<>(v1, v2, v3, v4, function.apply(v5), v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 6 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U6> Tuple16<T1, T2, T3, T4, T5, U6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> map6(Function1<? super T6, ? extends U6> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, function.apply(v6), v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 7 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U7> Tuple16<T1, T2, T3, T4, T5, T6, U7, T8, T9, T10, T11, T12, T13, T14, T15, T16> map7(Function1<? super T7, ? extends U7> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, function.apply(v7), v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 8 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U8> Tuple16<T1, T2, T3, T4, T5, T6, T7, U8, T9, T10, T11, T12, T13, T14, T15, T16> map8(Function1<? super T8, ? extends U8> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, function.apply(v8), v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 9 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U9> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, U9, T10, T11, T12, T13, T14, T15, T16> map9(Function1<? super T9, ? extends U9> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, function.apply(v9), v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 10 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U10> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, U10, T11, T12, T13, T14, T15, T16> map10(Function1<? super T10, ? extends U10> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, function.apply(v10), v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 11 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U11> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, U11, T12, T13, T14, T15, T16> map11(Function1<? super T11, ? extends U11> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, function.apply(v11), v12, v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 12 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U12> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, U12, T13, T14, T15, T16> map12(Function1<? super T12, ? extends U12> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, function.apply(v12), v13, v14, v15, v16);
- }
-
- /**
- * Apply attribute 13 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U13> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, U13, T14, T15, T16> map13(Function1<? super T13, ? extends U13> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, function.apply(v13), v14, v15, v16);
- }
-
- /**
- * Apply attribute 14 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U14> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, U14, T15, T16> map14(Function1<? super T14, ? extends U14> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, function.apply(v14), v15, v16);
- }
-
- /**
- * Apply attribute 15 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U15> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, U15, T16> map15(Function1<? super T15, ? extends U15> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, function.apply(v15), v16);
- }
-
- /**
- * Apply attribute 16 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, U16> map16(Function1<? super T16, ? extends U16> function) {
- return new Tuple16<>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, function.apply(v16));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16> Tuple16<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16> mapAll(Function16<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? super T10, ? super T11, ? super T12, ? super T13, ? super T14, ? super T15, ? super T16, Tuple16<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16>> function) {
- return function.apply(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16> Tuple16<U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5, Function1<? super T6, ? extends U6> function6, Function1<? super T7, ? extends U7> function7, Function1<? super T8, ? extends U8> function8, Function1<? super T9, ? extends U9> function9, Function1<? super T10, ? extends U10> function10, Function1<? super T11, ? extends U11> function11, Function1<? super T12, ? extends U12> function12, Function1<? super T13, ? extends U13> function13, Function1<? super T14, ? extends U14> function14, Function1<? super T15, ? extends U15> function15, Function1<? super T16, ? extends U16> function16) {
- return new Tuple16<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5), function6.apply(v6), function7.apply(v7), function8.apply(v8), function9.apply(v9), function10.apply(v10), function11.apply(v11), function12.apply(v12), function13.apply(v13), function14.apply(v14), function15.apply(v15), function16.apply(v16));
- }
-
- @Override
- public Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> clone() {
- return new Tuple16<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple2.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple2.java b/src/main/groovy/groovy/lang/Tuple2.java
index 3e48afc..e1e87e9 100644
--- a/src/main/groovy/groovy/lang/Tuple2.java
+++ b/src/main/groovy/groovy/lang/Tuple2.java
@@ -18,11 +18,6 @@
*/
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function2;
-
-import java.util.Optional;
-
/**
* Represents a list of 2 typed Objects.
*/
@@ -60,247 +55,4 @@ public final class Tuple2<T1, T2> extends Tuple {
return v2;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T3> Tuple3<T1, T2, T3> concat(T3 value) {
- return new Tuple3<>(v1, v2, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple2<T1, T2> concat(Tuple0 tuple) {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3> Tuple3<T1, T2, T3> concat(Tuple1<T3> tuple) {
- return new Tuple3<>(v1, v2, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4> Tuple4<T1, T2, T3, T4> concat(Tuple2<T3, T4> tuple) {
- return new Tuple4<>(v1, v2, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5> Tuple5<T1, T2, T3, T4, T5> concat(Tuple3<T3, T4, T5> tuple) {
- return new Tuple5<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6> Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple4<T3, T4, T5, T6> tuple) {
- return new Tuple6<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple5<T3, T4, T5, T6, T7> tuple) {
- return new Tuple7<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple6<T3, T4, T5, T6, T7, T8> tuple) {
- return new Tuple8<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8, T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple7<T3, T4, T5, T6, T7, T8, T9> tuple) {
- return new Tuple9<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8, T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple8<T3, T4, T5, T6, T7, T8, T9, T10> tuple) {
- return new Tuple10<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8, T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple9<T3, T4, T5, T6, T7, T8, T9, T10, T11> tuple) {
- return new Tuple11<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> tuple) {
- return new Tuple12<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple11<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple12<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple13<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple14<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13(), tuple.getV14());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 2.
- */
- public final Tuple2<Tuple0, Tuple2<T1, T2>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 1.
- */
- public final Tuple2<Tuple1<T1>, Tuple1<T2>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 0.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple0> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple2<T1, T2> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple1<T2> skip1() {
- return new Tuple1<>(v2);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple0 skip2() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Get a tuple with the two attributes swapped.
- */
- public final Tuple2<T2, T1> swap() {
- return new Tuple2<>(v2, v1);
- }
-
- /**
- * Whether two ranges represented by tuples overlap.
- */
- public static final <T extends Comparable<? super T>> boolean overlaps(Tuple2<T, T> left, Tuple2<T, T> right) {
- return left.v1.compareTo(right.v2) <= 0
- && left.v2.compareTo(right.v1) >= 0;
- }
-
- /**
- * The intersection of two ranges represented by tuples
- */
- public static final <T extends Comparable<? super T>> Optional<Tuple2<T, T>> intersect(Tuple2<T, T> left, Tuple2<T, T> right) {
- if (overlaps(left, right))
- return Optional.of(new Tuple2<>(
- left.v1.compareTo(right.v1) >= 0 ? left.v1 : right.v1,
- left.v2.compareTo(right.v2) <= 0 ? left.v2 : right.v2
- ));
- else
- return Optional.empty();
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function2<? super T1, ? super T2, ? extends R> function) {
- return function.apply(v1, v2);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple2<U1, T2> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple2<>(function.apply(v1), v2);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple2<T1, U2> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple2<>(v1, function.apply(v2));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2> Tuple2<U1, U2> mapAll(Function2<? super T1, ? super T2, Tuple2<U1, U2>> function) {
- return function.apply(v1, v2);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2> Tuple2<U1, U2> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2) {
- return new Tuple2<>(function1.apply(v1), function2.apply(v2));
- }
-
- @Override
- public Tuple2<T1, T2> clone() {
- return new Tuple2<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple3.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple3.java b/src/main/groovy/groovy/lang/Tuple3.java
index 6ce9b65..6e55651 100644
--- a/src/main/groovy/groovy/lang/Tuple3.java
+++ b/src/main/groovy/groovy/lang/Tuple3.java
@@ -19,9 +19,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function3;
-
/**
* Represents a list of 3 typed Objects.
*
@@ -72,240 +69,4 @@ public final class Tuple3<T1, T2, T3> extends Tuple {
return v3;
}
- /**
- * Concatenate a value to this tuple.
- */
- public final <T4> Tuple4<T1, T2, T3, T4> concat(T4 value) {
- return new Tuple4<>(v1, v2, v3, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple3<T1, T2, T3> concat(Tuple0 tuple) {
- return new Tuple3<>(v1, v2, v3);
- }
-
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4> Tuple4<T1, T2, T3, T4> concat(Tuple1<T4> tuple) {
- return new Tuple4<>(v1, v2, v3, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5> Tuple5<T1, T2, T3, T4, T5> concat(Tuple2<T4, T5> tuple) {
- return new Tuple5<>(v1, v2, v3, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6> Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple3<T4, T5, T6> tuple) {
- return new Tuple6<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple4<T4, T5, T6, T7> tuple) {
- return new Tuple7<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple5<T4, T5, T6, T7, T8> tuple) {
- return new Tuple8<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8, T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple6<T4, T5, T6, T7, T8, T9> tuple) {
- return new Tuple9<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8, T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple7<T4, T5, T6, T7, T8, T9, T10> tuple) {
- return new Tuple10<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8, T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple8<T4, T5, T6, T7, T8, T9, T10, T11> tuple) {
- return new Tuple11<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8, T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple9<T4, T5, T6, T7, T8, T9, T10, T11, T12> tuple) {
- return new Tuple12<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple10<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple11<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple12<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple13<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12(), tuple.getV13());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 3.
- */
- public final Tuple2<Tuple0, Tuple3<T1, T2, T3>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 2.
- */
- public final Tuple2<Tuple1<T1>, Tuple2<T2, T3>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 1.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple1<T3>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 0.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple0> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple3<T1, T2, T3> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple2<T2, T3> skip1() {
- return new Tuple2<>(v2, v3);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple1<T3> skip2() {
- return new Tuple1<>(v3);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple0 skip3() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function3<? super T1, ? super T2, ? super T3, ? extends R> function) {
- return function.apply(v1, v2, v3);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple3<U1, T2, T3> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple3<>(function.apply(v1), v2, v3);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple3<T1, U2, T3> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple3<>(v1, function.apply(v2), v3);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple3<T1, T2, U3> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple3<>(v1, v2, function.apply(v3));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3> Tuple3<U1, U2, U3> mapAll(Function3<? super T1, ? super T2, ? super T3, Tuple3<U1, U2, U3>> function) {
- return function.apply(v1, v2, v3);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3> Tuple3<U1, U2, U3> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3) {
- return new Tuple3<>(function1.apply(v1), function2.apply(v2), function3.apply(v3));
- }
-
- @Override
- public Tuple3<T1, T2, T3> clone() {
- return new Tuple3<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple4.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple4.java b/src/main/groovy/groovy/lang/Tuple4.java
index ce26f00..8c564b7 100644
--- a/src/main/groovy/groovy/lang/Tuple4.java
+++ b/src/main/groovy/groovy/lang/Tuple4.java
@@ -19,9 +19,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function4;
-
/**
* Represents a list of 4 typed Objects.
*
@@ -83,262 +80,4 @@ public final class Tuple4<T1, T2, T3, T4> extends Tuple {
return v4;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T5> Tuple5<T1, T2, T3, T4, T5> concat(T5 value) {
- return new Tuple5<>(v1, v2, v3, v4, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple4<T1, T2, T3, T4> concat(Tuple0 tuple) {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5> Tuple5<T1, T2, T3, T4, T5> concat(Tuple1<T5> tuple) {
- return new Tuple5<>(v1, v2, v3, v4, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6> Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple2<T5, T6> tuple) {
- return new Tuple6<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple3<T5, T6, T7> tuple) {
- return new Tuple7<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple4<T5, T6, T7, T8> tuple) {
- return new Tuple8<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8, T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple5<T5, T6, T7, T8, T9> tuple) {
- return new Tuple9<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8, T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple6<T5, T6, T7, T8, T9, T10> tuple) {
- return new Tuple10<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8, T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple7<T5, T6, T7, T8, T9, T10, T11> tuple) {
- return new Tuple11<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8, T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple8<T5, T6, T7, T8, T9, T10, T11, T12> tuple) {
- return new Tuple12<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8, T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple9<T5, T6, T7, T8, T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple10<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple11<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple12<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11(), tuple.getV12());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 4.
- */
- public final Tuple2<Tuple0, Tuple4<T1, T2, T3, T4>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 3.
- */
- public final Tuple2<Tuple1<T1>, Tuple3<T2, T3, T4>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 2.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple2<T3, T4>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 1.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple1<T4>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 0.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple0> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple4<T1, T2, T3, T4> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple3<T2, T3, T4> skip1() {
- return new Tuple3<>(v2, v3, v4);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple2<T3, T4> skip2() {
- return new Tuple2<>(v3, v4);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple1<T4> skip3() {
- return new Tuple1<>(v4);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple0 skip4() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R> function) {
- return function.apply(v1, v2, v3, v4);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple4<U1, T2, T3, T4> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple4<>(function.apply(v1), v2, v3, v4);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple4<T1, U2, T3, T4> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple4<>(v1, function.apply(v2), v3, v4);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple4<T1, T2, U3, T4> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple4<>(v1, v2, function.apply(v3), v4);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple4<T1, T2, T3, U4> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple4<>(v1, v2, v3, function.apply(v4));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4> Tuple4<U1, U2, U3, U4> mapAll(Function4<? super T1, ? super T2, ? super T3, ? super T4, Tuple4<U1, U2, U3, U4>> function) {
- return function.apply(v1, v2, v3, v4);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4> Tuple4<U1, U2, U3, U4> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4) {
- return new Tuple4<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4));
- }
-
- @Override
- public Tuple4<T1, T2, T3, T4> clone() {
- return new Tuple4<>(this);
- }
}
http://git-wip-us.apache.org/repos/asf/groovy/blob/892f67cd/src/main/groovy/groovy/lang/Tuple5.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/groovy/lang/Tuple5.java b/src/main/groovy/groovy/lang/Tuple5.java
index 74067bd..b4e9cc6 100644
--- a/src/main/groovy/groovy/lang/Tuple5.java
+++ b/src/main/groovy/groovy/lang/Tuple5.java
@@ -19,9 +19,6 @@
package groovy.lang;
-import groovy.util.function.Function1;
-import groovy.util.function.Function5;
-
/**
* Represents a list of 5 typed Objects.
*
@@ -94,283 +91,4 @@ public final class Tuple5<T1, T2, T3, T4, T5> extends Tuple {
return v5;
}
-
- /**
- * Concatenate a value to this tuple.
- */
- public final <T6> Tuple6<T1, T2, T3, T4, T5, T6> concat(T6 value) {
- return new Tuple6<>(v1, v2, v3, v4, v5, value);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final Tuple5<T1, T2, T3, T4, T5> concat(Tuple0 tuple) {
- return new Tuple5<>(v1, v2, v3, v4, v5);
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6> Tuple6<T1, T2, T3, T4, T5, T6> concat(Tuple1<T6> tuple) {
- return new Tuple6<>(v1, v2, v3, v4, v5, tuple.getV1());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> concat(Tuple2<T6, T7> tuple) {
- return new Tuple7<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> concat(Tuple3<T6, T7, T8> tuple) {
- return new Tuple8<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8, T9> Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> concat(Tuple4<T6, T7, T8, T9> tuple) {
- return new Tuple9<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8, T9, T10> Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> concat(Tuple5<T6, T7, T8, T9, T10> tuple) {
- return new Tuple10<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8, T9, T10, T11> Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> concat(Tuple6<T6, T7, T8, T9, T10, T11> tuple) {
- return new Tuple11<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8, T9, T10, T11, T12> Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> concat(Tuple7<T6, T7, T8, T9, T10, T11, T12> tuple) {
- return new Tuple12<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8, T9, T10, T11, T12, T13> Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> concat(Tuple8<T6, T7, T8, T9, T10, T11, T12, T13> tuple) {
- return new Tuple13<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8, T9, T10, T11, T12, T13, T14> Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> concat(Tuple9<T6, T7, T8, T9, T10, T11, T12, T13, T14> tuple) {
- return new Tuple14<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> concat(Tuple10<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> tuple) {
- return new Tuple15<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10());
- }
-
- /**
- * Concatenate a tuple to this tuple.
- */
- public final <T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> concat(Tuple11<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> tuple) {
- return new Tuple16<>(v1, v2, v3, v4, v5, tuple.getV1(), tuple.getV2(), tuple.getV3(), tuple.getV4(), tuple.getV5(), tuple.getV6(), tuple.getV7(), tuple.getV8(), tuple.getV9(), tuple.getV10(), tuple.getV11());
- }
-
- /**
- * Split this tuple into two tuples of degree 0 and 5.
- */
- public final Tuple2<Tuple0, Tuple5<T1, T2, T3, T4, T5>> split0() {
- return new Tuple2<>(limit0(), skip0());
- }
-
- /**
- * Split this tuple into two tuples of degree 1 and 4.
- */
- public final Tuple2<Tuple1<T1>, Tuple4<T2, T3, T4, T5>> split1() {
- return new Tuple2<>(limit1(), skip1());
- }
-
- /**
- * Split this tuple into two tuples of degree 2 and 3.
- */
- public final Tuple2<Tuple2<T1, T2>, Tuple3<T3, T4, T5>> split2() {
- return new Tuple2<>(limit2(), skip2());
- }
-
- /**
- * Split this tuple into two tuples of degree 3 and 2.
- */
- public final Tuple2<Tuple3<T1, T2, T3>, Tuple2<T4, T5>> split3() {
- return new Tuple2<>(limit3(), skip3());
- }
-
- /**
- * Split this tuple into two tuples of degree 4 and 1.
- */
- public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple1<T5>> split4() {
- return new Tuple2<>(limit4(), skip4());
- }
-
- /**
- * Split this tuple into two tuples of degree 5 and 0.
- */
- public final Tuple2<Tuple5<T1, T2, T3, T4, T5>, Tuple0> split5() {
- return new Tuple2<>(limit5(), skip5());
- }
-
- /**
- * Limit this tuple to degree 0.
- */
- public final Tuple0 limit0() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Limit this tuple to degree 1.
- */
- public final Tuple1<T1> limit1() {
- return new Tuple1<>(v1);
- }
-
- /**
- * Limit this tuple to degree 2.
- */
- public final Tuple2<T1, T2> limit2() {
- return new Tuple2<>(v1, v2);
- }
-
- /**
- * Limit this tuple to degree 3.
- */
- public final Tuple3<T1, T2, T3> limit3() {
- return new Tuple3<>(v1, v2, v3);
- }
-
- /**
- * Limit this tuple to degree 4.
- */
- public final Tuple4<T1, T2, T3, T4> limit4() {
- return new Tuple4<>(v1, v2, v3, v4);
- }
-
- /**
- * Limit this tuple to degree 5.
- */
- public final Tuple5<T1, T2, T3, T4, T5> limit5() {
- return this;
- }
-
- /**
- * Skip 0 degrees from this tuple.
- */
- public final Tuple5<T1, T2, T3, T4, T5> skip0() {
- return this;
- }
-
- /**
- * Skip 1 degrees from this tuple.
- */
- public final Tuple4<T2, T3, T4, T5> skip1() {
- return new Tuple4<>(v2, v3, v4, v5);
- }
-
- /**
- * Skip 2 degrees from this tuple.
- */
- public final Tuple3<T3, T4, T5> skip2() {
- return new Tuple3<>(v3, v4, v5);
- }
-
- /**
- * Skip 3 degrees from this tuple.
- */
- public final Tuple2<T4, T5> skip3() {
- return new Tuple2<>(v4, v5);
- }
-
- /**
- * Skip 4 degrees from this tuple.
- */
- public final Tuple1<T5> skip4() {
- return new Tuple1<>(v5);
- }
-
- /**
- * Skip 5 degrees from this tuple.
- */
- public final Tuple0 skip5() {
- return Tuple0.INSTANCE;
- }
-
- /**
- * Apply this tuple as arguments to a function.
- */
- public final <R> R map(Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> function) {
- return function.apply(v1, v2, v3, v4, v5);
- }
-
- /**
- * Apply attribute 1 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U1> Tuple5<U1, T2, T3, T4, T5> map1(Function1<? super T1, ? extends U1> function) {
- return new Tuple5<>(function.apply(v1), v2, v3, v4, v5);
- }
-
- /**
- * Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U2> Tuple5<T1, U2, T3, T4, T5> map2(Function1<? super T2, ? extends U2> function) {
- return new Tuple5<>(v1, function.apply(v2), v3, v4, v5);
- }
-
- /**
- * Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U3> Tuple5<T1, T2, U3, T4, T5> map3(Function1<? super T3, ? extends U3> function) {
- return new Tuple5<>(v1, v2, function.apply(v3), v4, v5);
- }
-
- /**
- * Apply attribute 4 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U4> Tuple5<T1, T2, T3, U4, T5> map4(Function1<? super T4, ? extends U4> function) {
- return new Tuple5<>(v1, v2, v3, function.apply(v4), v5);
- }
-
- /**
- * Apply attribute 5 as argument to a function and return a new tuple with the substituted argument.
- */
- public final <U5> Tuple5<T1, T2, T3, T4, U5> map5(Function1<? super T5, ? extends U5> function) {
- return new Tuple5<>(v1, v2, v3, v4, function.apply(v5));
- }
-
- /**
- * Maps the attributes of this tuple using a mapper function.
- */
- public final <U1, U2, U3, U4, U5> Tuple5<U1, U2, U3, U4, U5> mapAll(Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, Tuple5<U1, U2, U3, U4, U5>> function) {
- return function.apply(v1, v2, v3, v4, v5);
- }
-
- /**
- * Maps the attributes of this tuple using mapper functions.
- */
- public final <U1, U2, U3, U4, U5> Tuple5<U1, U2, U3, U4, U5> mapAll(Function1<? super T1, ? extends U1> function1, Function1<? super T2, ? extends U2> function2, Function1<? super T3, ? extends U3> function3, Function1<? super T4, ? extends U4> function4, Function1<? super T5, ? extends U5> function5) {
- return new Tuple5<>(function1.apply(v1), function2.apply(v2), function3.apply(v3), function4.apply(v4), function5.apply(v5));
- }
-
-
- @Override
- public Tuple5<T1, T2, T3, T4, T5> clone() {
- return new Tuple5<>(this);
- }
}