Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.maryanovsky.gwtutils.client
Class Pair<T1,T2>

    java.lang.Object
      com.maryanovsky.gwtutils.client.Pair<T1,T2>

    public final class Pair<T1,T2>

extends Object

A wrapper for any two other given objects.

Author:
  Maryanovsky Alexander

Constructor Summary
`Pair(T1 first, T2 second)` Creates a new `Pair` with the two given objects.

Method Summary
`boolean` | `equals(Object o)` Returns true iff the given Object is a `Pair`, and its two objects are the same as this one's (comparison done via Utils.areEqual(Object, Object)).
`T1` | `getFirst()` Returns the first object.
`T2` | `getSecond()` Returns the second object.
`int` | `hashCode()` Returns a hashcode combined from the hashcodes of the two target objects.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Pair

    public Pair(T1 first,
                T2 second)

  Creates a new `Pair` with the two given objects. Either of the objects may be `null`.

Method Detail

### getFirst

    public T1 getFirst()

  Returns the first object.

### getSecond

    public T2 getSecond()

  Returns the second object.

### hashCode

    public int hashCode()

  Returns a hashcode combined from the hashcodes of the two target objects.

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object o)

  Returns true iff the given Object is a `Pair`, and its two objects are the same as this one's (comparison done via Utils.areEqual(Object, Object)).

  Overrides:
    `equals` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD