Class Pair


  • public class Pair
    extends java.lang.Object
    Pairs.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​U>
      java.util.Map.Entry<T,​U>
      of​(T first, U second)
      Generate a pair of two items; a tuple, if you will.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • of

        public static <T,​U> java.util.Map.Entry<T,​U> of​(T first,
                                                                    U second)
        Generate a pair of two items; a tuple, if you will.
        Type Parameters:
        T - type of the first item.
        U - type of the second item.
        Parameters:
        first - first item in the pair.
        second - second item in the pair.
        Returns:
        a pair.