Pair (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.helpers

## Class Pair<T1,T2>

- java.lang.Object
- - org.neo4j.helpers.Pair<T1,T2>

- Type Parameters:
    `T1` - the type of the `first value` of the pair.
    `T2` - the type of the `other value` of the pair.
  Direct Known Subclasses:
    Triplet

      public abstract class Pair<T1,T2>
      extends Object

  Utility to handle pairs of objects.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T1,T2> Pair<T1,T2>` | `empty()`
    `boolean` | `equals(Object obj)`
    `abstract T1` | `first()`
    `int` | `hashCode()`
    `static <T1,T2> Pair<T1,T2>` | `of(T1 first, T2 other)` Create a new pair of objects.
    `abstract T2` | `other()`
    `String` | `toString()`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### empty

          public static <T1,T2> Pair<T1,T2> empty()

    - #### of

          public static <T1,T2> Pair<T1,T2> of(T1 first,
                               T2 other)

      Create a new pair of objects.
      Parameters:
        `first` - the first object in the pair.
        `other` - the other object in the pair.
      Returns:
        a new pair of the two parameters.

    - #### first

          public abstract T1 first()

      Returns:
        the first object in the pair.

    - #### other

          public abstract T2 other()

      Returns:
        the other object in the pair.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.