All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.polaris.core.tuple.Tuples Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
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);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy