Class Pair<U,​K>

java.lang.Object
battleship.utils.Pair<U,​K>
Type Parameters:
U - left
K - right

public class Pair<U,​K>
extends java.lang.Object
tuple containing 2 generic type elements
  • Field Summary

    Fields
    Modifier and Type Field Description
    private U left  
    private K right  
  • Constructor Summary

    Constructors
    Constructor Description
    Pair​(U left, K right)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    U getLeft()  
    K getRight()  
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

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

    • left

      private final U left
  • Constructor Details

    • Pair

      public Pair​(U left, K right)
  • Method Details

    • getLeft

      public U getLeft()
    • getRight

      public K getRight()
    • equals

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

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

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