public static Tuple2 fromArray(Object[] list) {
    """
	Create a {@link Tuple2} with the given array if it is small
	enough to fit inside a {@link Tuple2} to {@link Tuple8}.
	
	@param list the content of the Tuple (size 1 to 8)
	@return The new {@link Tuple2}.
	@throws IllegalArgumentException if the array is not of length 1-8
    """
		//noinspection ConstantConditions
		if (list == null || list.length < 2) {
			throw new IllegalArgumentException("null or too small array, need between 2 and 8 values");
		}

		switch (list.length){
			case 2:
				return of(list[0], list[1]);
			case 3:
				return of(list[0], list[1], list[2]);
			case 4:
				return of(list[0], list[1], list[2], list[3]);
			case 5:
				return of(list[0], list[1], list[2], list[3], list[4]);
			case 6:
				return of(list[0], list[1], list[2], list[3], list[4], list[5]);
			case 7:
				return of(list[0], list[1], list[2], list[3], list[4], list[5], list[6]);
			case 8:
				return of(list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7]);
		}
		throw new IllegalArgumentException("too many arguments ("+ list.length + "), need between 2 and 8 values");
	}
public static Tuple2 fromArray(Object[] list) {
		//noinspection ConstantConditions
		if (list == null || list.length < 2) {
			throw new IllegalArgumentException("null or too small array, need between 2 and 8 values");
		}

		switch (list.length){
			case 2:
				return of(list[0], list[1]);
			case 3:
				return of(list[0], list[1], list[2]);
			case 4:
				return of(list[0], list[1], list[2], list[3]);
			case 5:
				return of(list[0], list[1], list[2], list[3], list[4]);
			case 6:
				return of(list[0], list[1], list[2], list[3], list[4], list[5]);
			case 7:
				return of(list[0], list[1], list[2], list[3], list[4], list[5], list[6]);
			case 8:
				return of(list[0], list[1], list[2], list[3], list[4], list[5], list[6], list[7]);
		}
		throw new IllegalArgumentException("too many arguments ("+ list.length + "), need between 2 and 8 values");
	}
public static Tuple2 fromArray ( Object [ ] list ) { //noinspection ConstantConditions if ( list == null || list . length < 2 ) { throw new IllegalArgumentException ( "null or too small array, need between 2 and 8 values" ) ; } switch ( list . length ) { case 2 : return of ( list [ 0 ] , list [ 1 ] ) ; case 3 : return of ( list [ 0 ] , list [ 1 ] , list [ 2 ] ) ; case 4 : return of ( list [ 0 ] , list [ 1 ] , list [ 2 ] , list [ 3 ] ) ; case 5 : return of ( list [ 0 ] , list [ 1 ] , list [ 2 ] , list [ 3 ] , list [ 4 ] ) ; case 6 : return of ( list [ 0 ] , list [ 1 ] , list [ 2 ] , list [ 3 ] , list [ 4 ] , list [ 5 ] ) ; case 7 : return of ( list [ 0 ] , list [ 1 ] , list [ 2 ] , list [ 3 ] , list [ 4 ] , list [ 5 ] , list [ 6 ] ) ; case 8 : return of ( list [ 0 ] , list [ 1 ] , list [ 2 ] , list [ 3 ] , list [ 4 ] , list [ 5 ] , list [ 6 ] , list [ 7 ] ) ; } throw new IllegalArgumentException ( "too many arguments (" + list . length + "), need between 2 and 8 values" ) ; }
Create a {@link Tuple2} with the given array if it is small
enough to fit inside a {@link Tuple2} to {@link Tuple8}.

@param list the content of the Tuple (size 1 to 8)
@return The new {@link Tuple2}.
@throws IllegalArgumentException if the array is not of length 1-8
Create a { @link Tuple2 } with the given array if it is small enough to fit inside a { @link Tuple2 } to { @link Tuple8 } .