Class Pair<U,​V>

java.lang.Object
de.tilman_neumann.util.Pair<U,​V>
Type Parameters:
U - type of first value
V - type of second value
All Implemented Interfaces:
java.io.Serializable

public class Pair<U,​V>
extends java.lang.Object
implements java.io.Serializable
A simple utility class combining two values of arbitrary types in one object.
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor Description
    Pair​(U u, V v)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    U getFirst()  
    V getSecond()  
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Pair

      public Pair​(U u, V v)
  • Method Details

    • getFirst

      public U getFirst()
    • getSecond

      public V getSecond()
    • 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
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object