org.littleshoot.util
Class PairImpl<T1,T2>

java.lang.Object
  extended by org.littleshoot.util.PairImpl<T1,T2>
Type Parameters:
T1 - The type of the first element of this pair.
T2 - The type of the second element of this pair.
All Implemented Interfaces:
Pair<T1,T2>

public class PairImpl<T1,T2>
extends Object
implements Pair<T1,T2>

An implementation of the pair interface.


Constructor Summary
PairImpl(T1 first, T2 second)
          Constructs a new pair.
 
Method Summary
 boolean equals(Object other)
          
 T1 getFirst()
          Returns the first object in the pair.
 T2 getSecond()
          Returns the second object in the pair.
 int hashCode()
          
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PairImpl

public PairImpl(T1 first,
                T2 second)
Constructs a new pair.

Parameters:
first - The first object.
second - The second object.
Method Detail

getFirst

public T1 getFirst()
Returns the first object in the pair.

Specified by:
getFirst in interface Pair<T1,T2>
Returns:
The first object in the pair.

getSecond

public T2 getSecond()
Returns the second object in the pair.

Specified by:
getSecond in interface Pair<T1,T2>
Returns:
The second object in the pair.

equals

public boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011-2013 LittleShoot. All Rights Reserved.