org.opensaml.xml.util
Class Pair<T1,T2>

java.lang.Object
  extended by org.opensaml.xml.util.Pair<T1,T2>
Type Parameters:
T1 - type of the first object in the pair
T2 - type of the second object in the pair

public class Pair<T1,T2>
extends Object

Container for a pair of objects.


Field Summary
private  T1 first
          First object in pair.
private  T2 second
          Second object in pair.
 
Constructor Summary
Pair(T1 newFirst, T2 newSecond)
          Constructor.
 
Method Summary
 boolean equals(Object o)
          
 T1 getFirst()
          Gets the first object in the pair.
 T2 getSecond()
          Gets the second object in the pair.
 int hashCode()
          
 void setFirst(T1 newFirst)
          Sets the first object in the pair.
 void setSecond(T2 newSecond)
          Sets the second object in the pair.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

first

private T1 first
First object in pair.


second

private T2 second
Second object in pair.

Constructor Detail

Pair

public Pair(T1 newFirst,
            T2 newSecond)
Constructor.

Parameters:
newFirst - first object in the pair
newSecond - second object in the pair
Method Detail

getFirst

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

Returns:
first object in the pair

setFirst

public void setFirst(T1 newFirst)
Sets the first object in the pair.

Parameters:
newFirst - first object in the pair

getSecond

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

Returns:
second object in the pair

setSecond

public void setSecond(T2 newSecond)
Sets the second object in the pair.

Parameters:
newSecond - second object in the pair

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 1999-2013. All Rights Reserved.