@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); SchemaLink sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof SchemaLink)) { return false; } SchemaLink that = (SchemaLink) objectToCompare; return Objects.equals(getLinkType(), that.getLinkType()) && Objects.equals(getLinkName(), that.getLinkName()) && Objects.equals(getLinkProperties(), that.getLinkProperties()) && Objects.equals(getLinkedSchemaTypeGUID(), that.getLinkedSchemaTypeGUID()) && Objects.equals(getLinkedSchemaTypeName(), that.getLinkedSchemaTypeName()); }
SchemaLink extends SchemaElement { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof SchemaLink)) { return false; } SchemaLink that = (SchemaLink) objectToCompare; return Objects.equals(getLinkType(), that.getLinkType()) && Objects.equals(getLinkName(), that.getLinkName()) && Objects.equals(getLinkProperties(), that.getLinkProperties()) && Objects.equals(getLinkedSchemaTypeGUID(), that.getLinkedSchemaTypeGUID()) && Objects.equals(getLinkedSchemaTypeName(), that.getLinkedSchemaTypeName()); } }
SchemaLink extends SchemaElement { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof SchemaLink)) { return false; } SchemaLink that = (SchemaLink) objectToCompare; return Objects.equals(getLinkType(), that.getLinkType()) && Objects.equals(getLinkName(), that.getLinkName()) && Objects.equals(getLinkProperties(), that.getLinkProperties()) && Objects.equals(getLinkedSchemaTypeGUID(), that.getLinkedSchemaTypeGUID()) && Objects.equals(getLinkedSchemaTypeName(), that.getLinkedSchemaTypeName()); } SchemaLink();  SchemaLink(SchemaLink template); }
SchemaLink extends SchemaElement { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof SchemaLink)) { return false; } SchemaLink that = (SchemaLink) objectToCompare; return Objects.equals(getLinkType(), that.getLinkType()) && Objects.equals(getLinkName(), that.getLinkName()) && Objects.equals(getLinkProperties(), that.getLinkProperties()) && Objects.equals(getLinkedSchemaTypeGUID(), that.getLinkedSchemaTypeGUID()) && Objects.equals(getLinkedSchemaTypeName(), that.getLinkedSchemaTypeName()); } SchemaLink();  SchemaLink(SchemaLink template); @Override SchemaElement cloneSchemaElement(); String getLinkType(); void setLinkType(String linkType); String getLinkName(); void setLinkName(String linkName); Map<String, String> getLinkProperties(); void setLinkProperties(Map<String, String> linkProperties); String getLinkedSchemaTypeGUID(); void setLinkedSchemaTypeGUID(String linkedSchemaTypeGUID); String getLinkedSchemaTypeName(); void setLinkedSchemaTypeName(String linkedSchemaTypeName); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
SchemaLink extends SchemaElement { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof SchemaLink)) { return false; } SchemaLink that = (SchemaLink) objectToCompare; return Objects.equals(getLinkType(), that.getLinkType()) && Objects.equals(getLinkName(), that.getLinkName()) && Objects.equals(getLinkProperties(), that.getLinkProperties()) && Objects.equals(getLinkedSchemaTypeGUID(), that.getLinkedSchemaTypeGUID()) && Objects.equals(getLinkedSchemaTypeName(), that.getLinkedSchemaTypeName()); } SchemaLink();  SchemaLink(SchemaLink template); @Override SchemaElement cloneSchemaElement(); String getLinkType(); void setLinkType(String linkType); String getLinkName(); void setLinkName(String linkName); Map<String, String> getLinkProperties(); void setLinkProperties(Map<String, String> linkProperties); String getLinkedSchemaTypeGUID(); void setLinkedSchemaTypeGUID(String linkedSchemaTypeGUID); String getLinkedSchemaTypeName(); void setLinkedSchemaTypeName(String linkedSchemaTypeName); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }