/** * Create a {@link Tuple3} with the given objects. * * @param t1 The first value in the tuple. * @param t2 The second value in the tuple. * @param t3 The third value in the tuple. * @param <T1> The type of the first value. * @param <T2> The type of the second value. * @param <T3> The type of the third value. * @return The new {@link Tuple3}. */ public static <T1, T2, T3> Tuple3<T1, T2, T3> of(T1 t1, T2 t2, T3 t3) { return new Tuple3<T1, T2, T3>(3, t1, t2, t3); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Tuple4)) return false; if (!super.equals(o)) return false; Tuple4 tuple4 = (Tuple4) o; if (t4 != null ? !t4.equals(tuple4.t4) : tuple4.t4 != null) return false; return true; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (t4 != null ? t4.hashCode() : 0); return result; }
@Override public String toString() { return super.toString()+ (t4 != null ? ","+t4.toString() : ""); } }