@Test public void equals_compareWithOtherType_shouldBeFalse() { ReadOnlyRowId rid = new ReadOnlyRowId(1337); Assert.assertFalse(rid.equals(new Object())); }
@Override public boolean equals(Object obj) { if (obj == null || !(ReadOnlyRowId.class.equals(obj.getClass()))) { return false; } return getRowNum() == (((ReadOnlyRowId) obj).getRowNum()); }
ReadOnlyRowId extends RowId { @Override public boolean equals(Object obj) { if (obj == null || !(ReadOnlyRowId.class.equals(obj.getClass()))) { return false; } return getRowNum() == (((ReadOnlyRowId) obj).getRowNum()); } }
ReadOnlyRowId extends RowId { @Override public boolean equals(Object obj) { if (obj == null || !(ReadOnlyRowId.class.equals(obj.getClass()))) { return false; } return getRowNum() == (((ReadOnlyRowId) obj).getRowNum()); } ReadOnlyRowId(int rowNum); }
ReadOnlyRowId extends RowId { @Override public boolean equals(Object obj) { if (obj == null || !(ReadOnlyRowId.class.equals(obj.getClass()))) { return false; } return getRowNum() == (((ReadOnlyRowId) obj).getRowNum()); } ReadOnlyRowId(int rowNum); @Override int hashCode(); @Override boolean equals(Object obj); int getRowNum(); @Override String toString(); }
ReadOnlyRowId extends RowId { @Override public boolean equals(Object obj) { if (obj == null || !(ReadOnlyRowId.class.equals(obj.getClass()))) { return false; } return getRowNum() == (((ReadOnlyRowId) obj).getRowNum()); } ReadOnlyRowId(int rowNum); @Override int hashCode(); @Override boolean equals(Object obj); int getRowNum(); @Override String toString();  }