Method Detail

clone

This method should be implemented to call a copy constructor on the class of the
object being cloned. The copy constructor should take the CopyContext as a parameter
in addition to the existing instance to copy. The copy constructor should first call
CopyContext.addObjectMapping(T, T) to identify the newly constructed instance
as a copy of the existing instance. It should then copy all fields, using
CopyContext.updateReference(T) to copy any reference fields.

Fields that are aggregate parts of the object should always be copied.
A referenced object is an aggregate if properties or methods on the object
being copied can modify the externally-visible value of the referenced object.

If the semantics of the referenced object require that it have a single parent,
owner, context, etc., and the object being copied is that parent, owner, or context,
then the referenced object should always be copied.

If one of these exceptions applies, the CopyContext should be given an opportunity
to update the reference before the reference is copied explicitly. Use
CopyContext.updateReference(T) to update the reference. If CopyContext.updateReference(T) returns
the original object (that is, if the reference some field is equal to the reference of the same field of another instance))
then copy the object manually by invoking a Clone method, a copy constructor, or by manually
constructing a new instance and copying the values.

checkForSameDefinition

Checks to determine if another instance has the same definition as this instance and
returns true if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false for all derived-class instances.
Derived classes should check the type of other to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object).

checkForSameDefinition

Checks to determine if another instance has the same definition as this instance and
returns true if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false for all derived-class instances.
Derived classes should check the type of other to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object).

getInequalityCriteria

Gets how the calculated value should be checked to the threshold in the concrete type.
This works by checking the relation between the computed value and the threshold defined on the
derived type. So for example, if the computed value is 7000, the threshold is 6000 and this
property set to InequalityCondition.GREATER_THAN, this constraint will be satisfied.

setInequalityCriteria

Sets how the calculated value should be checked to the threshold in the concrete type.
This works by checking the relation between the computed value and the threshold defined on the
derived type. So for example, if the computed value is 7000, the threshold is 6000 and this
property set to InequalityCondition.GREATER_THAN, this constraint will be satisfied.