Package org.jppf.utils
Class Pair<U,V>
java.lang.Object
org.jppf.utils.Pair<U,V>
- Type Parameters:
U- the type of the first element in the pair.V- the type of the second element in the pair.
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BundleWithTasks,HostIP
Utility class holding a pair of references to two objects.
- Author:
- Laurent Cohen
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
first
The first object of this pair. -
second
The second object of this pair.
-
-
Constructor Details
-
Pair
Initialize this pair with two values.- Parameters:
first- the first value of the new pair.second- the second value of the new pair.
-
-
Method Details
-
first
Get the first value of this pair.- Returns:
- an object of type U.
-
second
Get the second value of this pair.- Returns:
- an object of type V.
-
left
Get the left-side value of this pair.- Returns:
- an object of type U.
-
right
Get the right-side value of this pair.- Returns:
- an object of type V.
-
hashCode
public int hashCode() -
equals
-
toString
-