@SuppressWarnings("unchecked")
    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
            return true;
        }
        if ((obj == null) || (obj.getClass() != this.getClass())) {
            return false;
        }

        Tuple3<T1, T2, T3> other = (Tuple3<T1, T2, T3>) obj;
        return ((value1 == null) ? (other.value1 == null) : (value1.equals(other.value1))) &&
               ((value2 == null) ? (other.value2 == null) : (value2.equals(other.value2))) &&
               ((value3 == null) ? (other.value3 == null) : (value3.equals(other.value3)));
    }