Tuple implements Serializable { @Override public boolean equals(@Nullable final Object obj) { boolean eq; if (this == obj) { eq = true; } else if ((obj != null) && (obj instanceof Tuple)) { @SuppressWarnings("unchecked") final Tuple<T1, T2> that = (Tuple<T1, T2>) obj; eq = that.canEqual(this); eq = eq && Objects.equal(value1, that.value1); eq = eq && Objects.equal(value2, that.value2); } else { eq = false; } return eq; } Tuple(@Nonnull final T1 value1, @Nonnull final T2 value2); @SuppressWarnings("ConstantConditions") @Deprecated private  Tuple(); @Nonnull static Tuple<T1, T2> create(@Nonnull final T1 value1, @Nonnull final T2 value2); @Nonnull T1 getValue1(); @Nonnull T2 getValue2(); boolean canEqual(@Nonnull final Object obj); @Override boolean equals(@Nullable final Object obj); @Override int hashCode(); @Nonnull @Override String toString();  }
@Test public void testEquals() { LOG.info("testEquals"); final Tuple<Double, String> s = Tuple.create(x1, x2); final Tuple<Double, String> t = Tuple.create(y1, y2); Assert.assertTrue(x.equals(s)); Assert.assertTrue(y.equals(t)); Assert.assertFalse(x.equals(t)); Assert.assertFalse(y.equals(s)); }