Class API


  • public final class API
    extends java.lang.Object
    The 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 extends Pair<X,​X>>
      Y
      Tuple​(X... elements)  
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 type
        Y - the second element type
        Parameters:
        first - the first element of the pair
        second - 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 type
        Y - the second element type
        Z - the third element type
        Parameters:
        first - the first element of the tuple
        second - the second element of the tuple
        third - 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 type
        Y - the second element type
        Z - the third element type
        D - the fourth element type
        Parameters:
        first - the first element of the tuple
        second - the second element of the tuple
        third - the third element of the tuple
        fourth - the fourth element of the tuple
        Returns:
        the created tuple
      • Tuple

        public static <X,​Y extends Pair<X,​X>> Y Tuple​(X... elements)