@Test public void testEquals() { assertTrue(getTestObject().equals(getTestObject())); TypeDefLink testObject = getTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("A String")); TypeDefLink differentObject = new TypeDefLink(guid, name); assertFalse(testObject.equals(differentObject)); differentObject = getTestObject(); differentObject.setReplacedByTypeGUID("DifferentHomeId"); assertFalse(testObject.equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } TypeDefLink that = (TypeDefLink) objectToCompare; return Objects.equals(guid, that.guid) && Objects.equals(name, that.name) && status == that.status && Objects.equals(replacedByTypeGUID, that.replacedByTypeGUID) && Objects.equals(replacedByTypeName, that.replacedByTypeName); }
TypeDefLink extends TypeDefElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } TypeDefLink that = (TypeDefLink) objectToCompare; return Objects.equals(guid, that.guid) && Objects.equals(name, that.name) && status == that.status && Objects.equals(replacedByTypeGUID, that.replacedByTypeGUID) && Objects.equals(replacedByTypeName, that.replacedByTypeName); } }
TypeDefLink extends TypeDefElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } TypeDefLink that = (TypeDefLink) objectToCompare; return Objects.equals(guid, that.guid) && Objects.equals(name, that.name) && status == that.status && Objects.equals(replacedByTypeGUID, that.replacedByTypeGUID) && Objects.equals(replacedByTypeName, that.replacedByTypeName); } TypeDefLink();   TypeDefLink(String            guid,
                String            name);  TypeDefLink(TypeDefLink template); }
TypeDefLink extends TypeDefElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } TypeDefLink that = (TypeDefLink) objectToCompare; return Objects.equals(guid, that.guid) && Objects.equals(name, that.name) && status == that.status && Objects.equals(replacedByTypeGUID, that.replacedByTypeGUID) && Objects.equals(replacedByTypeName, that.replacedByTypeName); } TypeDefLink();   TypeDefLink(String            guid,
                String            name);  TypeDefLink(TypeDefLink template); String getGUID(); void setGUID(String guid); String getName(); void setName(String name); TypeDefStatus getStatus(); void setStatus(TypeDefStatus status); String getReplacedByTypeGUID(); void setReplacedByTypeGUID(String replacedByTypeGUID); String getReplacedByTypeName(); void setReplacedByTypeName(String replacedByTypeName); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
TypeDefLink extends TypeDefElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } TypeDefLink that = (TypeDefLink) objectToCompare; return Objects.equals(guid, that.guid) && Objects.equals(name, that.name) && status == that.status && Objects.equals(replacedByTypeGUID, that.replacedByTypeGUID) && Objects.equals(replacedByTypeName, that.replacedByTypeName); } TypeDefLink();   TypeDefLink(String            guid,
                String            name);  TypeDefLink(TypeDefLink template); String getGUID(); void setGUID(String guid); String getName(); void setName(String name); TypeDefStatus getStatus(); void setStatus(TypeDefStatus status); String getReplacedByTypeGUID(); void setReplacedByTypeGUID(String replacedByTypeGUID); String getReplacedByTypeName(); void setReplacedByTypeName(String replacedByTypeName); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }