Class Pair<T1,​T2>


  • public final class Pair<T1,​T2>
    extends java.lang.Object
    Author:
    Mathias Hofer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      T1 first  
      T2 second  
    • Constructor Summary

      Constructors 
      Constructor Description
      Pair​(T1 first, T2 second)  
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      static <T1,​T2>
      Pair<T1,​T2>
      of​(T1 a, T2 b)  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • first

        public final T1 first
      • second

        public final T2 second
    • Constructor Detail

      • Pair

        public Pair​(T1 first,
                    T2 second)
        Parameters:
        first - some element
        second - some element
    • Method Detail

      • of

        public static <T1,​T2> Pair<T1,​T2> of​(T1 a,
                                                         T2 b)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object