redefined hashCode and equals methods for TupleImpl