@Test public void testIsSameTypeAs() { Assert.assertTrue("'a' and 'A' should be considdered the same type", new TestType("a").isSameTypeAs("A")); Assert.assertTrue("'B' and 'b' should be considdered the same address", new TestType("B").isSameTypeAs(new TestType("b"))); }
public boolean isSameTypeAs(final Object that) { if (equals(that)) { return true; } if (that instanceof String) { if (toString().equalsIgnoreCase((String) that)) { return true; } } return false; }
BaseType { public boolean isSameTypeAs(final Object that) { if (equals(that)) { return true; } if (that instanceof String) { if (toString().equalsIgnoreCase((String) that)) { return true; } } return false; } }
BaseType { public boolean isSameTypeAs(final Object that) { if (equals(that)) { return true; } if (that instanceof String) { if (toString().equalsIgnoreCase((String) that)) { return true; } } return false; }  }
BaseType { public boolean isSameTypeAs(final Object that) { if (equals(that)) { return true; } if (that instanceof String) { if (toString().equalsIgnoreCase((String) that)) { return true; } } return false; }  @Override int hashCode(); @Override boolean equals(final Object that); boolean isSameTypeAs(final Object that); }
BaseType { public boolean isSameTypeAs(final Object that) { if (equals(that)) { return true; } if (that instanceof String) { if (toString().equalsIgnoreCase((String) that)) { return true; } } return false; }  @Override int hashCode(); @Override boolean equals(final Object that); boolean isSameTypeAs(final Object that);  }