@Test public void testEquals() { MetaDataEditorFieldDefinition def = new MetaDataEditorFieldDefinition(); MetaDataEditorFieldDefinition def2 = new MetaDataEditorFieldDefinition(); ImportsFieldDefinition def3 = new ImportsFieldDefinition(); def.setDefaultValue("test"); def2.setDefaultValue("test"); assertEquals(def, def2); def.setDefaultValue("anyValue"); assertFalse(def.equals(def2)); assertFalse(def.equals(def3)); }
@Override public boolean equals(Object o) { if (o instanceof MetaDataEditorFieldDefinition) { MetaDataEditorFieldDefinition other = (MetaDataEditorFieldDefinition) o; return Objects.equals(defaultValue, other.defaultValue); } return false; }
MetaDataEditorFieldDefinition extends AbstractFieldDefinition { @Override public boolean equals(Object o) { if (o instanceof MetaDataEditorFieldDefinition) { MetaDataEditorFieldDefinition other = (MetaDataEditorFieldDefinition) o; return Objects.equals(defaultValue, other.defaultValue); } return false; } }
MetaDataEditorFieldDefinition extends AbstractFieldDefinition { @Override public boolean equals(Object o) { if (o instanceof MetaDataEditorFieldDefinition) { MetaDataEditorFieldDefinition other = (MetaDataEditorFieldDefinition) o; return Objects.equals(defaultValue, other.defaultValue); } return false; } MetaDataEditorFieldDefinition(); }
MetaDataEditorFieldDefinition extends AbstractFieldDefinition { @Override public boolean equals(Object o) { if (o instanceof MetaDataEditorFieldDefinition) { MetaDataEditorFieldDefinition other = (MetaDataEditorFieldDefinition) o; return Objects.equals(defaultValue, other.defaultValue); } return false; } MetaDataEditorFieldDefinition(); @Override MetaDataEditorFieldType getFieldType(); String getDefaultValue(); void setDefaultValue(String defaultValue); @Override boolean equals(Object o); @Override int hashCode(); }
MetaDataEditorFieldDefinition extends AbstractFieldDefinition { @Override public boolean equals(Object o) { if (o instanceof MetaDataEditorFieldDefinition) { MetaDataEditorFieldDefinition other = (MetaDataEditorFieldDefinition) o; return Objects.equals(defaultValue, other.defaultValue); } return false; } MetaDataEditorFieldDefinition(); @Override MetaDataEditorFieldType getFieldType(); String getDefaultValue(); void setDefaultValue(String defaultValue); @Override boolean equals(Object o); @Override int hashCode(); static final MetaDataEditorFieldType FIELD_TYPE; }