<commit_before>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);
    }<commit_msg>Add some documentation to OrderedPair<commit_after>package co.phoenixlab.common.lang;

import java.util.Objects;

public class OrderedPair<T, U> {

    private final T t;
    private final U u;

    /**
     * Creates an ordered pair (2-tuple) with the first element being t and the second u.
     * @param t The first element in the ordered pair
     * @param u The second element in the ordered pair
     */
    public OrderedPair(T t, U u) {
        this.t = t;
        this.u = u;
    }

    /**
     * Gets the first element in the ordered pair
     */
    public T getT() {
        return t;
    }

    /**
     * Gets the second element in the ordered pair
     */
    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);
    }
{'fraction_non_alphanumeric': 0.12260216847372811, 'fraction_numerical': 0.0004170141784820684, 'mean_word_length': 1.8124267291910903, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '933428', 'n_tokens_mistral': 768, 'n_tokens_neox': 750, 'n_words': 243}