Class PairImpl<T1,T2>
java.lang.Object
org.eclipse.collections.impl.tuple.PairImpl<T1,T2>
- All Implemented Interfaces:
Serializable
,Comparable<Pair<T1,
,T2>> Pair<T1,
T2>
- Direct Known Subclasses:
TwinImpl
A PairImpl is a container that holds two related objects. It is the equivalent of an Association in Smalltalk, or an
implementation of Map.Entry in the JDK.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
one
-
two
-
-
Constructor Details
-
PairImpl
-
-
Method Details
-
getOne
-
getTwo
-
put
-
swap
Description copied from interface:Pair
Method used to swap the elements of pair.e.g. Pair<String, Integer> pair = Tuples.pair("One", 1); Pair<Integer, String> swappedPair = pair.swap();
-
equals
-
hashCode
public int hashCode() -
toString
-
toEntry
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T1>
-