Package picard.sam.util

## Class Pair<X extends Comparable<X>,​Y extends Comparable<Y>>

- java.lang.Object
- - picard.sam.util.Pair<X,​Y>

- All Implemented Interfaces:
    `Comparable<Pair<X,​Y>>`

      public class Pair<X extends Comparable<X>,​Y extends Comparable<Y>>
      extends Object
      implements Comparable<Pair<X,​Y>>

  Simple Pair class. reimplemented since the commons one is final, and I wanted a different toString function...

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Pair​(X left, Y right)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compareTo​(Pair<X,​Y> o)` |
    `boolean` | `equals​(Object o)` | Calculate whether this pair object is equal to another object.
    `X` | `getLeft()` |
    `Y` | `getRight()` |
    `int` | `hashCode()` | Basic hashcode function.
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Pair

          public Pair​(X left,
                      Y right)

  - ### Method Detail

    - #### getLeft

          public X getLeft()

    - #### getRight

          public Y getRight()

    - #### equals

          public boolean equals​(Object o)

      Calculate whether this pair object is equal to another object.
      Overrides:
        `equals` in class `Object`
      Parameters:
        `o` - The other object (hopefully a pair).
      Returns:
        True if the two are equal; false otherwise.

    - #### hashCode

          public int hashCode()

      Basic hashcode function. Assume hashcodes of left and right are randomly distributed and return the XOR of the two.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashcode of the pair.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### compareTo

          public int compareTo​(Pair<X,​Y> o)

      Specified by:
        `compareTo` in interface `Comparable<X extends Comparable<X>>`