org.square.qa.utilities.constructs
Class Pair<T,U>

java.lang.Object
  extended by org.square.qa.utilities.constructs.Pair<T,U>

public class Pair<T,U>
extends Object


Constructor Summary
Pair(T first, U second)
          Constructor
 
Method Summary
 int compareTo(Pair<T,U> other)
           
 boolean equals(Object obj)
           
 boolean equalsFirst(Pair<T,U> dst)
          Equality of contained object of type T
 boolean equalsFirst(T dst)
          Equality of contained object of type T
 boolean equalsSecond(Pair<T,U> dst)
          Equality of contained object of type U
 boolean equalsSecond(U dst)
          Equality of contained object of type U
 T getFirst()
          Get contained object of type T
 U getSecond()
          Get contained object of type U
 int hashCode()
           
 void putFirst(T first)
          Put object of type T into the container
 void putSecond(U second)
          Put object of type U into the container
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(T first,
            U second)
Constructor

Parameters:
first - is the contained object of type T
second - is the contained object of type U
Method Detail

getFirst

public T getFirst()
Get contained object of type T

Returns:
contained object of type T

getSecond

public U getSecond()
Get contained object of type U

Returns:
contained object of type U

putFirst

public void putFirst(T first)
Put object of type T into the container

Parameters:
first - is of type T

putSecond

public void putSecond(U second)
Put object of type U into the container

Parameters:
second - is of type U

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

equalsFirst

public boolean equalsFirst(Pair<T,U> dst)
Equality of contained object of type T

Parameters:
dst - is an object of type Pair to be compared
Returns:
true if equality passes

equalsSecond

public boolean equalsSecond(Pair<T,U> dst)
Equality of contained object of type U

Parameters:
dst - is an object of type Pair to be compared
Returns:
true if equality passes

equalsFirst

public boolean equalsFirst(T dst)
Equality of contained object of type T

Parameters:
dst - is an object of type T
Returns:
true if equality passes

equalsSecond

public boolean equalsSecond(U dst)
Equality of contained object of type U

Parameters:
dst - is an object of type U
Returns:
true if equality passes

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Pair<T,U> other)


Copyright © 2013. All Rights Reserved.