Top Description Fields Constructors Methods
org.eclipse.collections.impl.tuple

pack-priv final Class TwinImpl<T>

extends PairImpl<T, T>
implements Twin<T>
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.tuple.Twin, org.eclipse.collections.api.tuple.Pair, java.lang.Comparable, java.io.Serializable
Imports
org.eclipse.collections.api.tuple.Twin

A TwinImpl is a PairImpl that has the same type for both items. This is a convenience class

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv
TwinImpl(T newOne, T newTwo)

Method Summary

Modifier and TypeMethod and Description
public TwinImpl<T>
Inherited from org.eclipse.collections.impl.tuple.PairImpl:
compareToequalsgetOnegetTwohashCodeputtoEntrytoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.collections.impl.tuple.PairImpl.serialVersionUID.

Constructor Detail

TwinImplback to summary
pack-priv TwinImpl(T newOne, T newTwo)

Method Detail

swapback to summary
public TwinImpl<T> swap()

Overrides org.eclipse.collections.impl.tuple.PairImpl.swap.

Implements org.eclipse.collections.api.tuple.Twin.swap, org.eclipse.collections.api.tuple.Pair.swap.

Doc from org.eclipse.collections.api.tuple.Pair.swap.

Method used to swap the elements of pair.

e.g.
Pair<String, Integer> pair = Tuples.pair("One", 1);
Pair<Integer, String> swappedPair = pair.swap();
Annotations
@Override