- java.lang.Object
-
- com.jongsoft.lang.API
-
public final class API extends java.lang.ObjectThe API class allows access to the libraries interfaces and control structures.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <X,Y>
Pair<X,Y>Tuple(X first, Y second)Create a new tuple containing 2 elements.static <X,Y,Z>
Triplet<X,Y,Z>Tuple(X first, Y second, Z third)Create a new tuple containing 3 elements.static <X,Y,Z,D>
Quadruplet<X,Y,Z,D>Tuple(X first, Y second, Z third, D fourth)Create a new tuple containing 4 elements.
-
-
-
Method Detail
-
Tuple
public static <X,Y> Pair<X,Y> Tuple(X first, Y second)
Create a new tuple containing 2 elements.- Type Parameters:
X- the first element typeY- the second element type- Parameters:
first- the first element of the pairsecond- the second element of the pair- Returns:
- the created tuple
-
Tuple
public static <X,Y,Z> Triplet<X,Y,Z> Tuple(X first, Y second, Z third)
Create a new tuple containing 3 elements.- Type Parameters:
X- the first element typeY- the second element typeZ- the third element type- Parameters:
first- the first element of the tuplesecond- the second element of the tuplethird- the third element of the tuple- Returns:
- the created tuple
-
Tuple
public static <X,Y,Z,D> Quadruplet<X,Y,Z,D> Tuple(X first, Y second, Z third, D fourth)
Create a new tuple containing 4 elements.- Type Parameters:
X- the first element typeY- the second element typeZ- the third element typeD- the fourth element type- Parameters:
first- the first element of the tuplesecond- the second element of the tuplethird- the third element of the tuplefourth- the fourth element of the tuple- Returns:
- the created tuple
-
-