jetbrains.buildServer.util
Class Couple<T>

java.lang.Object
  extended by jetbrains.buildServer.util.Couple<T>

public final class Couple<T>
extends java.lang.Object

A couple of two items with same type. A value object.


Field Summary
 T a
          The first item.
 T b
          The second item.
 
Constructor Summary
Couple(T[] ab)
           
Couple(T a, T b)
           
 
Method Summary
 boolean equals(Couple<T> that)
           
 boolean equals(java.lang.Object thatObject)
           
 T get(int index)
          Returns a if index 0 or b if index 1.
 T getA()
          Returns a, to allow use Couple in jsp.
 T getB()
          Returns b, to allow use Couple in jsp.
 int hashCode()
           
static
<TT> Couple<TT>
of(TT a, TT b)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

a

public final T a
The first item.


b

public final T b
The second item.

Constructor Detail

Couple

public Couple(T a,
              T b)

Couple

public Couple(@NotNull
              T[] ab)
Method Detail

of

public static <TT> Couple<TT> of(TT a,
                                 TT b)

getA

public final T getA()
Returns a, to allow use Couple in jsp.

Returns:
a.

getB

public final T getB()
Returns b, to allow use Couple in jsp.

Returns:
b.

get

public final T get(int index)
Returns a if index 0 or b if index 1.

Parameters:
index - 0 or 1
Returns:
a or b

equals

public boolean equals(Couple<T> that)

equals

public boolean equals(java.lang.Object thatObject)
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