groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Add missing concat methods of tuples
Date Mon, 26 Nov 2018 14:34:37 GMT
Repository: groovy
Updated Branches:
  refs/heads/master aa372c484 -> b6933c7ef


Add missing concat methods of tuples


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/b6933c7e
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/b6933c7e
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/b6933c7e

Branch: refs/heads/master
Commit: b6933c7ef628a199d5960b6ab96c61fca3fe7302
Parents: aa372c4
Author: Daniel Sun <sunlan@apache.org>
Authored: Mon Nov 26 22:34:10 2018 +0800
Committer: Daniel Sun <sunlan@apache.org>
Committed: Mon Nov 26 22:34:10 2018 +0800

----------------------------------------------------------------------
 src/main/groovy/groovy/lang/Tuple0.java  |  7 +++++
 src/main/groovy/groovy/lang/Tuple1.java  |  7 +++++
 src/main/groovy/groovy/lang/Tuple10.java |  7 +++++
 src/main/groovy/groovy/lang/Tuple11.java |  7 +++++
 src/main/groovy/groovy/lang/Tuple12.java |  7 +++++
 src/main/groovy/groovy/lang/Tuple13.java |  8 ++++++
 src/main/groovy/groovy/lang/Tuple14.java |  7 +++++
 src/main/groovy/groovy/lang/Tuple15.java |  7 +++++
 src/main/groovy/groovy/lang/Tuple16.java |  3 +++
 src/main/groovy/groovy/lang/Tuple2.java  |  7 +++++
 src/main/groovy/groovy/lang/Tuple3.java  |  8 ++++++
 src/main/groovy/groovy/lang/Tuple4.java  |  8 ++++++
 src/main/groovy/groovy/lang/Tuple5.java  |  7 +++++
 src/main/groovy/groovy/lang/Tuple6.java  |  8 ++++++
 src/main/groovy/groovy/lang/Tuple7.java  |  8 ++++++
 src/main/groovy/groovy/lang/Tuple8.java  |  8 ++++++
 src/main/groovy/groovy/lang/Tuple9.java  |  8 ++++++
 src/test/groovy/lang/TupleTest.java      | 38 ++++++++++++++++++++++++++-
 18 files changed, 159 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 f46c8f9..c7c4d9c 100644
--- a/src/main/groovy/groovy/lang/Tuple0.java
+++ b/src/main/groovy/groovy/lang/Tuple0.java
@@ -41,6 +41,13 @@ public final class Tuple0 extends Tuple {
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 9ecc6d0..bef131c 100644
--- a/src/main/groovy/groovy/lang/Tuple1.java
+++ b/src/main/groovy/groovy/lang/Tuple1.java
@@ -58,6 +58,13 @@ public final class Tuple1<T1> extends Tuple {
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 55ee715..97b6408 100644
--- a/src/main/groovy/groovy/lang/Tuple10.java
+++ b/src/main/groovy/groovy/lang/Tuple10.java
@@ -111,6 +111,13 @@ public final class Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
extends Tupl
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 96baab0..04c4133 100644
--- a/src/main/groovy/groovy/lang/Tuple11.java
+++ b/src/main/groovy/groovy/lang/Tuple11.java
@@ -117,6 +117,13 @@ public final class Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T11> extends
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 7eee60e..b0d83bb 100644
--- a/src/main/groovy/groovy/lang/Tuple12.java
+++ b/src/main/groovy/groovy/lang/Tuple12.java
@@ -124,6 +124,13 @@ public final class Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T11, T12> ex
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 70a5189..2a240d5 100644
--- a/src/main/groovy/groovy/lang/Tuple13.java
+++ b/src/main/groovy/groovy/lang/Tuple13.java
@@ -129,6 +129,14 @@ public final class Tuple13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T11, T12, T1
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 a7c9db1..934af52 100644
--- a/src/main/groovy/groovy/lang/Tuple14.java
+++ b/src/main/groovy/groovy/lang/Tuple14.java
@@ -134,6 +134,13 @@ public final class Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T11, T12, T1
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 1c3c67b..b995753 100644
--- a/src/main/groovy/groovy/lang/Tuple15.java
+++ b/src/main/groovy/groovy/lang/Tuple15.java
@@ -140,6 +140,13 @@ public final class Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T11, T12, T1
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 e5532fa..bcc8cc8 100644
--- a/src/main/groovy/groovy/lang/Tuple16.java
+++ b/src/main/groovy/groovy/lang/Tuple16.java
@@ -136,6 +136,9 @@ public final class Tuple16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
T11, T12, T1
         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.

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 baeec81..3e48afc 100644
--- a/src/main/groovy/groovy/lang/Tuple2.java
+++ b/src/main/groovy/groovy/lang/Tuple2.java
@@ -71,6 +71,13 @@ public final class Tuple2<T1, T2> extends Tuple {
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 e7b1ead..6ce9b65 100644
--- a/src/main/groovy/groovy/lang/Tuple3.java
+++ b/src/main/groovy/groovy/lang/Tuple3.java
@@ -82,6 +82,14 @@ public final class Tuple3<T1, T2, T3> extends Tuple {
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 0ac5245..ce26f00 100644
--- a/src/main/groovy/groovy/lang/Tuple4.java
+++ b/src/main/groovy/groovy/lang/Tuple4.java
@@ -94,6 +94,14 @@ public final class Tuple4<T1, T2, T3, T4> extends Tuple {
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 e7c4f43..74067bd 100644
--- a/src/main/groovy/groovy/lang/Tuple5.java
+++ b/src/main/groovy/groovy/lang/Tuple5.java
@@ -105,6 +105,13 @@ public final class Tuple5<T1, T2, T3, T4, T5> extends Tuple {
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 8c5620f..14542d4 100644
--- a/src/main/groovy/groovy/lang/Tuple6.java
+++ b/src/main/groovy/groovy/lang/Tuple6.java
@@ -116,6 +116,14 @@ public final class Tuple6<T1, T2, T3, T4, T5, T6> extends Tuple
{
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 e865388..ea06599 100644
--- a/src/main/groovy/groovy/lang/Tuple7.java
+++ b/src/main/groovy/groovy/lang/Tuple7.java
@@ -127,6 +127,14 @@ public final class Tuple7<T1, T2, T3, T4, T5, T6, T7> extends Tuple
{
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 a1e8a03..35a148e 100644
--- a/src/main/groovy/groovy/lang/Tuple8.java
+++ b/src/main/groovy/groovy/lang/Tuple8.java
@@ -138,6 +138,14 @@ public final class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> extends
Tuple {
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/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 ab8b39b..247c845 100644
--- a/src/main/groovy/groovy/lang/Tuple9.java
+++ b/src/main/groovy/groovy/lang/Tuple9.java
@@ -150,6 +150,14 @@ public final class Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> extends
Tuple {
     /**
      * 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());
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/b6933c7e/src/test/groovy/lang/TupleTest.java
----------------------------------------------------------------------
diff --git a/src/test/groovy/lang/TupleTest.java b/src/test/groovy/lang/TupleTest.java
index 8569adb..7fa373e 100644
--- a/src/test/groovy/lang/TupleTest.java
+++ b/src/test/groovy/lang/TupleTest.java
@@ -381,9 +381,45 @@ public class TupleTest extends GroovyTestCase {
         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 testCompareTo() {


Mime
View raw message