@Test public void equalsTest() { FieldValue a = FieldValue.create(1, 100000); FieldValue b = FieldValue.create(1, 100000); assertEquals(a, b); FieldValue c = FieldValue.create("foo", 100); FieldValue d = FieldValue.create("foo", 100); assertEquals(c, d); assertNotEquals(a, c); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FieldValue)) { return false; } FieldValue other = (FieldValue) o; return this.defaultFieldValue == other.defaultFieldValue && this.columnID == other.columnID && this.columnKey.equals(other.columnKey) && this.value == other.value; }
FieldValue implements Record { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FieldValue)) { return false; } FieldValue other = (FieldValue) o; return this.defaultFieldValue == other.defaultFieldValue && this.columnID == other.columnID && this.columnKey.equals(other.columnKey) && this.value == other.value; } }
FieldValue implements Record { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FieldValue)) { return false; } FieldValue other = (FieldValue) o; return this.defaultFieldValue == other.defaultFieldValue && this.columnID == other.columnID && this.columnKey.equals(other.columnKey) && this.value == other.value; } private  FieldValue(); }
FieldValue implements Record { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FieldValue)) { return false; } FieldValue other = (FieldValue) o; return this.defaultFieldValue == other.defaultFieldValue && this.columnID == other.columnID && this.columnKey.equals(other.columnKey) && this.value == other.value; } private  FieldValue(); static FieldValue create(long columnID, long value); static FieldValue create(String columnKey, long value); long getColumnID(); String getColumnKey(); long getValue(); @Override long shard(long shardWidth); @Override boolean isDefault(); @Override int compareTo(Record record); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
FieldValue implements Record { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof FieldValue)) { return false; } FieldValue other = (FieldValue) o; return this.defaultFieldValue == other.defaultFieldValue && this.columnID == other.columnID && this.columnKey.equals(other.columnKey) && this.value == other.value; } private  FieldValue(); static FieldValue create(long columnID, long value); static FieldValue create(String columnKey, long value); long getColumnID(); String getColumnKey(); long getValue(); @Override long shard(long shardWidth); @Override boolean isDefault(); @Override int compareTo(Record record); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final FieldValue DEFAULT; }