@Test public void testEquals() { FieldRow f = FieldRow.create("f1", 42); assertTrue(f.equals(f)); assertFalse(f.equals(new Integer(42))); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FieldRow)) { return false; } FieldRow rhs = (FieldRow) obj; return new EqualsBuilder() .append(this.fieldName, rhs.fieldName) .append(this.rowID, rhs.rowID) .append(this.rowKey, rhs.rowKey) .isEquals(); }
FieldRow { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FieldRow)) { return false; } FieldRow rhs = (FieldRow) obj; return new EqualsBuilder() .append(this.fieldName, rhs.fieldName) .append(this.rowID, rhs.rowID) .append(this.rowKey, rhs.rowKey) .isEquals(); } }
FieldRow { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FieldRow)) { return false; } FieldRow rhs = (FieldRow) obj; return new EqualsBuilder() .append(this.fieldName, rhs.fieldName) .append(this.rowID, rhs.rowID) .append(this.rowKey, rhs.rowKey) .isEquals(); } private  FieldRow(String fieldName, long rowID, String rowKey); }
FieldRow { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FieldRow)) { return false; } FieldRow rhs = (FieldRow) obj; return new EqualsBuilder() .append(this.fieldName, rhs.fieldName) .append(this.rowID, rhs.rowID) .append(this.rowKey, rhs.rowKey) .isEquals(); } private  FieldRow(String fieldName, long rowID, String rowKey); static FieldRow create(String fieldName, long rowID); static FieldRow create(String fieldName, String rowKey); String getFieldName(); long getRowID(); String getRowKey(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
FieldRow { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof FieldRow)) { return false; } FieldRow rhs = (FieldRow) obj; return new EqualsBuilder() .append(this.fieldName, rhs.fieldName) .append(this.rowID, rhs.rowID) .append(this.rowKey, rhs.rowKey) .isEquals(); } private  FieldRow(String fieldName, long rowID, String rowKey); static FieldRow create(String fieldName, long rowID); static FieldRow create(String fieldName, String rowKey); String getFieldName(); long getRowID(); String getRowKey(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }