package tp1.ex2_1;

public class Pair<T> {
    private T e1, e2;

    public Pair(T e1, T e2) {
        this.e1 = e1;
        this.e2 = e2;
    }

    public T getE1() {
        return e1;
    }

    public T getE2() {
        return e2;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Pair) {
            Pair<?> p = (Pair<?>) obj;
            return e1.equals(p.e1) && e2.equals(p.e2);
        }
        return false;
    }
}
