package co.phoenixlab.common.lang;

import java.util.Objects;

public class OrderedPair<T, U> {

    private final T t;
    private final U u;

    public OrderedPair(T t, U u) {
        this.t = t;
        this.u = u;
    }

    public T getT() {
        return t;
    }

    public U getU() {
        return u;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        OrderedPair<?, ?> that = (OrderedPair<?, ?>) o;
        return Objects.equals(t, that.t) &&
                Objects.equals(u, that.u);
    }

    @Override
    public int hashCode() {
        return Objects.hash(t, u);
    }

    /**
     * Creates an ordered pair with the given elements. Equivalent to {@link #OrderedPair(Object, Object)}.
     */
    public static <T, U> OrderedPair<T, U> pair(T t, U u) {
        return new OrderedPair<>(t, u);
    }

    /**
     * Creates an ordered pair of an object and itself. Equivalent to calling {@link #OrderedPair(Object, Object)} with
     * the same object for both arguments.
     */
    public static <T> OrderedPair<T, T> twin(T t) {
        return new OrderedPair<>(t, t);
    }

}

@@ -145,132 +145,480 @@
     
-public OrderedPair(T t, U u) %7B%0A        this.t = t;%0A        this.u = u;%0A    %7D%0A%0A    public T getT() %7B%0A        return t;%0A    %7D%0A
+/**%0A     * Creates an ordered pair (2-tuple) with the first element being t and the second u.%0A     * @param t The first element in the ordered pair%0A     * @param u The second element in the ordered pair%0A     */%0A    public OrderedPair(T t, U u) %7B%0A        this.t = t;%0A        this.u = u;%0A    %7D%0A%0A    /**%0A     * Gets the first element in the ordered pair%0A     */%0A    public T getT() %7B%0A        return t;%0A    %7D%0A%0A    /**%0A     * Gets the second element in the ordered pair%0A     */
 %0A   

Add some documentation to OrderedPair