@Test public void testEquals() { assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("DummyString")); assertTrue(getTestObject().equals(getTestObject())); ExternalIdentifier sameObject = getTestObject(); assertTrue(sameObject.equals(sameObject)); ExternalIdentifier differentObject = getTestObject(); differentObject.setGUID("Different"); assertFalse(getTestObject().equals(differentObject)); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalIdentifier)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalIdentifier that = (ExternalIdentifier) objectToCompare; return Objects.equals(getIdentifier(), that.getIdentifier()) && Objects.equals(getDescription(), that.getDescription()) && Objects.equals(getUsage(), that.getUsage()) && Objects.equals(getSource(), that.getSource()) && getKeyPattern() == that.getKeyPattern() && Objects.equals(getScope(), that.getScope()) && Objects.equals(getScopeDescription(), that.getScopeDescription()); }
ExternalIdentifier extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalIdentifier)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalIdentifier that = (ExternalIdentifier) objectToCompare; return Objects.equals(getIdentifier(), that.getIdentifier()) && Objects.equals(getDescription(), that.getDescription()) && Objects.equals(getUsage(), that.getUsage()) && Objects.equals(getSource(), that.getSource()) && getKeyPattern() == that.getKeyPattern() && Objects.equals(getScope(), that.getScope()) && Objects.equals(getScopeDescription(), that.getScopeDescription()); } }
ExternalIdentifier extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalIdentifier)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalIdentifier that = (ExternalIdentifier) objectToCompare; return Objects.equals(getIdentifier(), that.getIdentifier()) && Objects.equals(getDescription(), that.getDescription()) && Objects.equals(getUsage(), that.getUsage()) && Objects.equals(getSource(), that.getSource()) && getKeyPattern() == that.getKeyPattern() && Objects.equals(getScope(), that.getScope()) && Objects.equals(getScopeDescription(), that.getScopeDescription()); } ExternalIdentifier();  ExternalIdentifier(ExternalIdentifier templateExternalIdentifier); }
ExternalIdentifier extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalIdentifier)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalIdentifier that = (ExternalIdentifier) objectToCompare; return Objects.equals(getIdentifier(), that.getIdentifier()) && Objects.equals(getDescription(), that.getDescription()) && Objects.equals(getUsage(), that.getUsage()) && Objects.equals(getSource(), that.getSource()) && getKeyPattern() == that.getKeyPattern() && Objects.equals(getScope(), that.getScope()) && Objects.equals(getScopeDescription(), that.getScopeDescription()); } ExternalIdentifier();  ExternalIdentifier(ExternalIdentifier templateExternalIdentifier); String getIdentifier(); void setIdentifier(String identifier); String getDescription(); void setDescription(String description); String getUsage(); void setUsage(String usage); String getSource(); void setSource(String source); KeyPattern getKeyPattern(); void setKeyPattern(KeyPattern keyPattern); Referenceable getScope(); void setScope(Referenceable scope); String getScopeDescription(); void setScopeDescription(String scopeDescription); @Override String toString(); @Override boolean equals(Object objectToCompare); }
ExternalIdentifier extends Referenceable { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof ExternalIdentifier)) { return false; } if (!super.equals(objectToCompare)) { return false; } ExternalIdentifier that = (ExternalIdentifier) objectToCompare; return Objects.equals(getIdentifier(), that.getIdentifier()) && Objects.equals(getDescription(), that.getDescription()) && Objects.equals(getUsage(), that.getUsage()) && Objects.equals(getSource(), that.getSource()) && getKeyPattern() == that.getKeyPattern() && Objects.equals(getScope(), that.getScope()) && Objects.equals(getScopeDescription(), that.getScopeDescription()); } ExternalIdentifier();  ExternalIdentifier(ExternalIdentifier templateExternalIdentifier); String getIdentifier(); void setIdentifier(String identifier); String getDescription(); void setDescription(String description); String getUsage(); void setUsage(String usage); String getSource(); void setSource(String source); KeyPattern getKeyPattern(); void setKeyPattern(KeyPattern keyPattern); Referenceable getScope(); void setScope(Referenceable scope); String getScopeDescription(); void setScopeDescription(String scopeDescription); @Override String toString(); @Override boolean equals(Object objectToCompare);  }