StringValue implements CellValue { @Override public boolean equals(final Object o) { if (o == this) { return true; } if (!(o instanceof StringValue)) { return false; } final StringValue other = (StringValue) o; return this.value.equals(other.value); } StringValue(final String value); static CellValue from(final Object o); @Override boolean equals(final Object o); @Override final int hashCode(); @Override void setToCell(final TableCell cell); @Override final String toString();  }
@Test public void testEquals() { final StringValue v = new StringValue("ok"); Assert.assertEquals(v, v); Assert.assertNotEquals(1, v); Assert.assertNotEquals(v, 1); Assert.assertEquals(v, new StringValue("ok")); Assert.assertEquals(new StringValue("ok"), v); Assert.assertNotEquals(v, new StringValue("ko")); Assert.assertNotEquals(new StringValue("ko"), v); }