Top Description Methods
org.eclipse.collections.api.tuple

public Interface Twin<T>

extends Pair<T, T>

A Twin is a Pair where both elements have the same type. An instance of this interface can be created by calling Tuples.twin(Object, Object).

Method Summary

Modifier and TypeMethod and Description
public Twin<T>
swap()

Redeclares org.eclipse.collections.api.tuple.Pair.swap.

Method used to swap the elements of pair.

Inherited from org.eclipse.collections.api.tuple.Pair:
getOnegetTwoisEqualisSameputtoEntry

Method Detail

swapback to summary
public Twin<T> swap()

Redeclares 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