@Test public void testEquals() { assertTrue(getTestObject().equals(getTestObject())); InstancePropertyValue testObject = getTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getTestObject().equals(null)); assertFalse(getTestObject().equals("A String")); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof InstancePropertyValue)) { return false; } InstancePropertyValue that = (InstancePropertyValue) objectToCompare; return getInstancePropertyCategory() == that.getInstancePropertyCategory() && Objects.equals(getTypeGUID(), that.getTypeGUID()) && Objects.equals(getTypeName(), that.getTypeName()); }
InstancePropertyValue extends InstanceElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof InstancePropertyValue)) { return false; } InstancePropertyValue that = (InstancePropertyValue) objectToCompare; return getInstancePropertyCategory() == that.getInstancePropertyCategory() && Objects.equals(getTypeGUID(), that.getTypeGUID()) && Objects.equals(getTypeName(), that.getTypeName()); } }
InstancePropertyValue extends InstanceElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof InstancePropertyValue)) { return false; } InstancePropertyValue that = (InstancePropertyValue) objectToCompare; return getInstancePropertyCategory() == that.getInstancePropertyCategory() && Objects.equals(getTypeGUID(), that.getTypeGUID()) && Objects.equals(getTypeName(), that.getTypeName()); } protected  InstancePropertyValue(); protected  InstancePropertyValue(InstancePropertyCategory instancePropertyCategory); protected  InstancePropertyValue(InstancePropertyValue template); }
InstancePropertyValue extends InstanceElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof InstancePropertyValue)) { return false; } InstancePropertyValue that = (InstancePropertyValue) objectToCompare; return getInstancePropertyCategory() == that.getInstancePropertyCategory() && Objects.equals(getTypeGUID(), that.getTypeGUID()) && Objects.equals(getTypeName(), that.getTypeName()); } protected  InstancePropertyValue(); protected  InstancePropertyValue(InstancePropertyCategory instancePropertyCategory); protected  InstancePropertyValue(InstancePropertyValue template); abstract InstancePropertyValue cloneFromSubclass(); abstract String valueAsString(); abstract Object valueAsObject(); InstancePropertyCategory getInstancePropertyCategory(); void setInstancePropertyCategory(InstancePropertyCategory instancePropertyCategory); String getTypeGUID(); void setTypeGUID(String typeGUID); String getTypeName(); void setTypeName(String typeName); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
InstancePropertyValue extends InstanceElementHeader { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof InstancePropertyValue)) { return false; } InstancePropertyValue that = (InstancePropertyValue) objectToCompare; return getInstancePropertyCategory() == that.getInstancePropertyCategory() && Objects.equals(getTypeGUID(), that.getTypeGUID()) && Objects.equals(getTypeName(), that.getTypeName()); } protected  InstancePropertyValue(); protected  InstancePropertyValue(InstancePropertyCategory instancePropertyCategory); protected  InstancePropertyValue(InstancePropertyValue template); abstract InstancePropertyValue cloneFromSubclass(); abstract String valueAsString(); abstract Object valueAsObject(); InstancePropertyCategory getInstancePropertyCategory(); void setInstancePropertyCategory(InstancePropertyCategory instancePropertyCategory); String getTypeGUID(); void setTypeGUID(String typeGUID); String getTypeName(); void setTypeName(String typeName); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }