@Test public void testEquals() { assertTrue(getDateTestObject().equals(getDateTestObject())); InstancePropertyValue testObject = getDateTestObject(); assertTrue(testObject.equals(testObject)); assertFalse(getDateTestObject().equals(null)); assertFalse(getDateTestObject().equals("A String")); }
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } PrimitivePropertyValue that = (PrimitivePropertyValue) objectToCompare; return primitiveDefCategory == that.primitiveDefCategory && Objects.equals(primitiveValue, that.primitiveValue); }
PrimitivePropertyValue extends InstancePropertyValue { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } PrimitivePropertyValue that = (PrimitivePropertyValue) objectToCompare; return primitiveDefCategory == that.primitiveDefCategory && Objects.equals(primitiveValue, that.primitiveValue); } }
PrimitivePropertyValue extends InstancePropertyValue { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } PrimitivePropertyValue that = (PrimitivePropertyValue) objectToCompare; return primitiveDefCategory == that.primitiveDefCategory && Objects.equals(primitiveValue, that.primitiveValue); } PrimitivePropertyValue();  PrimitivePropertyValue(PrimitivePropertyValue   template); }
PrimitivePropertyValue extends InstancePropertyValue { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } PrimitivePropertyValue that = (PrimitivePropertyValue) objectToCompare; return primitiveDefCategory == that.primitiveDefCategory && Objects.equals(primitiveValue, that.primitiveValue); } PrimitivePropertyValue();  PrimitivePropertyValue(PrimitivePropertyValue   template); InstancePropertyValue cloneFromSubclass(); String valueAsString(); Object valueAsObject(); PrimitiveDefCategory getPrimitiveDefCategory(); void setPrimitiveDefCategory(PrimitiveDefCategory primitiveDefCategory); Object getPrimitiveValue(); void setPrimitiveValue(Object primitiveValue); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode(); }
PrimitivePropertyValue extends InstancePropertyValue { @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } PrimitivePropertyValue that = (PrimitivePropertyValue) objectToCompare; return primitiveDefCategory == that.primitiveDefCategory && Objects.equals(primitiveValue, that.primitiveValue); } PrimitivePropertyValue();  PrimitivePropertyValue(PrimitivePropertyValue   template); InstancePropertyValue cloneFromSubclass(); String valueAsString(); Object valueAsObject(); PrimitiveDefCategory getPrimitiveDefCategory(); void setPrimitiveDefCategory(PrimitiveDefCategory primitiveDefCategory); Object getPrimitiveValue(); void setPrimitiveValue(Object primitiveValue); @Override String toString(); @Override boolean equals(Object objectToCompare); @Override int hashCode();  }