Class Pair<T1,T2>
java.lang.Object
net.shibboleth.utilities.java.support.collection.Pair<T1,T2>
- Type Parameters:
T1
- type of the first object in the pairT2
- type of the second object in the pair
- Direct Known Subclasses:
LangBearingString
public class Pair<T1,T2> extends Object
Container for a pair of objects.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description 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()
-
Field Details
-
first
First object in pair. -
second
Second object in pair.
-
-
Constructor Details
-
Pair
public Pair()Constructor. -
Pair
Constructor.- Parameters:
newFirst
- first object in the pairnewSecond
- second object in the pair
-
Pair
Copy constructor.- Parameters:
pair
- pair to be copied
-
-
Method Details
-
getFirst
Gets the first object in the pair.- Returns:
- first object in the pair
-
setFirst
Sets the first object in the pair.- Parameters:
newFirst
- first object in the pair
-
getSecond
Gets the second object in the pair.- Returns:
- second object in the pair
-
setSecond
Sets the second object in the pair.- Parameters:
newSecond
- second object in the pair
-
equals
-
hashCode
public int hashCode() -
toString
-