Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
io.polaris.core.tuple.Tuples Maven / Gradle / Ivy
package io.polaris.core.tuple;
/**
* @author Qt
* @since 1.8
*/
public class Tuples {
public static Tuple1 of(T1 first) {
return new Tuple1<>(first);
}
public static Tuple2 of(T1 first, T2 second) {
return new Tuple2<>(first, second);
}
public static Tuple3 of(T1 first, T2 second, T3 third) {
return new Tuple3<>(first, second, third);
}
public static Tuple4 of(T1 first, T2 second, T3 third, T4 fourth) {
return new Tuple4<>(first, second, third, fourth);
}
public static Tuple5 of(T1 first, T2 second, T3 third, T4 fourth, T5 fifth) {
return new Tuple5<>(first, second, third, fourth, fifth);
}
public static Tuple6 of(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth) {
return new Tuple6<>(first, second, third, fourth, fifth, sixth);
}
public static Tuple7 of(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth, T7 seventh) {
return new Tuple7<>(first, second, third, fourth, fifth, sixth, seventh);
}
public static Tuple8 of(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth, T7 seventh, T8 eighth) {
return new Tuple8<>(first, second, third, fourth, fifth, sixth, seventh, eighth);
}
public static Tuple9 of(T1 first, T2 second, T3 third, T4 fourth, T5 fifth, T6 sixth, T7 seventh, T8 eighth, T9 ninth) {
return new Tuple9<>(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth);
}
public static TupleN of(Object... array) {
return new TupleN(array);
}
}