de.team33.patterns.tuple.janus.Pair Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tuple-janus Show documentation
Show all versions of tuple-janus Show documentation
Provides generic tuple types.
package de.team33.patterns.tuple.janus;
import java.util.Arrays;
import java.util.List;
public class Pair extends Tuple {
private final L left;
private final R right;
public Pair(final L left, final R right) {
this.left = left;
this.right = right;
}
public static Pair of(final L left, final R right) {
return new Pair<>(left, right);
}
public final L left() {
return left;
}
public final R right() {
return right;
}
@Override
public final List