Class TwinImpl<T>
java.lang.Object
org.eclipse.collections.impl.tuple.PairImpl<T,T>
org.eclipse.collections.impl.tuple.TwinImpl<T>
- All Implemented Interfaces:
Serializable
,Comparable<Pair<T,
,T>> Pair<T,
,T> Twin<T>
A TwinImpl is a PairImpl that has the same type for both items. This is a convenience class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.eclipse.collections.impl.tuple.PairImpl
compareTo, equals, getOne, getTwo, hashCode, put, toEntry, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
TwinImpl
-
-
Method Details
-
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();
-