// onjava/Tuple.java
// (c)2021 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Tuple library using type argument inference
package onjava;
public class Tuple {
public static Tuple2 tuple(A a, B b) {
return new Tuple2<>(a, b);
}
public static Tuple3
tuple(A a, B b, C c) {
return new Tuple3<>(a, b, c);
}
public static Tuple4
tuple(A a, B b, C c, D d) {
return new Tuple4<>(a, b, c, d);
}
public static
Tuple5 tuple(A a, B b, C c, D d, E e) {
return new Tuple5<>(a, b, c, d, e);
}
}