Package org.eclipse.net4j.util.collection

## Class Pair<T1,​T2>

- java.lang.Object
- - org.eclipse.net4j.util.collection.Pair<T1,​T2>

- Direct Known Subclasses:
    `Triplet`

      public class Pair<T1,​T2>
      extends java.lang.Object

  Author:
    Eike Stepper

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Pair()` |
    `Pair​(Pair<T1,​T2> source)` |
    `Pair​(T1 element1, T2 element2)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Pair<T1,​T2>` | `copy()` |
    `static <T1,​T2> Pair<T1,​T2>` | `create()` |
    `static <T1,​T2> Pair<T1,​T2>` | `create​(T1 element1, T2 element2)` |
    `boolean` | `equals​(java.lang.Object obj)` |
    `T1` | `getElement1()` |
    `T2` | `getElement2()` |
    `int` | `hashCode()` |
    `void` | `setElement1​(T1 element1)` |
    `void` | `setElement2​(T2 element2)` |
    `java.lang.String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### Pair

          public Pair()

    - #### Pair

          public Pair​(T1 element1,
                      T2 element2)

    - #### Pair

          public Pair​(Pair<T1,​T2> source)

      Since:
        2.0

  - ### Method Detail

    - #### getElement1

          public final T1 getElement1()

    - #### setElement1

          public void setElement1​(T1 element1)

    - #### getElement2

          public final T2 getElement2()

    - #### setElement2

          public void setElement2​(T2 element2)

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`
      Since:
        2.0

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`
      Since:
        2.0

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`
      Since:
        2.0

    - #### copy

          public Pair<T1,​T2> copy()

      Since:
        3.3

    - #### create

          public static <T1,​T2> Pair<T1,​T2> create()

      Since:
        3.3

    - #### create

          public static <T1,​T2> Pair<T1,​T2> create​(T1 element1,
                                                               T2 element2)

      Since:
        3.3