@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new TestType("a"), new TestType("A")) .addEqualityGroup(new TestType("Bd"), new TestType("bD")) .testEquals(); }
@Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that instanceof BaseType) { final BaseType th = (BaseType) that; if (toString().equalsIgnoreCase(th.toString())) { return true; } } return false; }
BaseType { @Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that instanceof BaseType) { final BaseType th = (BaseType) that; if (toString().equalsIgnoreCase(th.toString())) { return true; } } return false; } }
BaseType { @Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that instanceof BaseType) { final BaseType th = (BaseType) that; if (toString().equalsIgnoreCase(th.toString())) { return true; } } return false; }  }
BaseType { @Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that instanceof BaseType) { final BaseType th = (BaseType) that; if (toString().equalsIgnoreCase(th.toString())) { return true; } } return false; }  @Override int hashCode(); @Override boolean equals(final Object that); boolean isSameTypeAs(final Object that); }
BaseType { @Override public boolean equals(final Object that) { if (this == that) { return true; } else if (that instanceof BaseType) { final BaseType th = (BaseType) that; if (toString().equalsIgnoreCase(th.toString())) { return true; } } return false; }  @Override int hashCode(); @Override boolean equals(final Object that); boolean isSameTypeAs(final Object that);  }