package com.github.peterpaul.fn;

import javax.annotation.Nonnull;

import static com.github.peterpaul.fn.validations.Validations.notNull;

public final class Pair<L, R> {
    public static <L, R> Pair<L, R> pair(@Nonnull L left, @Nonnull R right) {
        return new Pair<>(left, right);
    }

    private final L left;
    private final R right;

    private Pair(@Nonnull L left, @Nonnull R right) {
        this.left = notNull(left);
        this.right = notNull(right);
    }

    @Nonnull
    public L getLeft() {
        return left;
    }

    @Nonnull
    public R getRight() {
        return right;
    }

    @Override
    public String toString() {
        return "pair(" + left + ", " + right + ')';
    }
}

@@ -607,24 +607,126 @@
 ght;%0A    %7D%0A%0A
+%09@Nonnull%0A%09public %3CT%3E T map(@Nonnull BiFunction%3CL, R, T%3E fun) %7B%0A%09%09return fun.apply(left, right);%0A%09%7D%0A%09%0A
     @Overrid
@@ -816,10 +816,45 @@
 ;%0A    %7D%0A
+%09%0A%09// TODO add equals and hashcode%0A
 %7D%0A

Add map function to Pair.