Package org.identityconnectors.common
Class Pair<T1,T2>
- java.lang.Object
-
- org.identityconnectors.common.Pair<T1,T2>
-
- All Implemented Interfaces:
java.util.Map.Entry<T1,T2>
public class Pair<T1,T2> extends java.lang.Object implements java.util.Map.Entry<T1,T2>An arbitrary pair of objects. Convenient implementation of Map.Entry.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)T1getKey()T2getValue()inthashCode()static <L,R>
Pair<L,R>of(L left, R right)Obtains a mutable pair of two objects inferring the generic types.T2setValue(T2 value)java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static <L,R> Pair<L,R> of(L left, R right)
Obtains a mutable pair of two objects inferring the generic types.This factory allows the pair to be created using inference to obtain the generic types.
- Type Parameters:
L- the left element typeR- the right element type- Parameters:
left- the left element, may be nullright- the right element, may be null- Returns:
- a pair formed from the two parameters, not null
- Since:
- 1.4
-
hashCode
public int hashCode()
-
equals
public boolean equals(java.lang.Object object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-