@Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Pair<S, T> other = (Pair<S, T>) obj;
        if (this.fst != other.fst && (this.fst == null || !this.fst.equals(other.fst))) {
            return false;
        }
        if (this.snd != other.snd && (this.snd == null || !this.snd.equals(other.snd))) {
            return false;
        }
        return true;
    }