Class: Condition

Condition

Condition for subscribed Attributes.

Requires

  • module:easejs
  • module:AttributeType
  • module:AttributeValue

Methods

compare(_newAttributeValue, _oldAttributeValue){boolean}

Processes the comparison.
Name Type Description
_newAttributeValue AttributeValue new Attribute that should be compared
_oldAttributeValue AttributeValue old Attribute

equals(_condition){boolean}

Compares this instance with the given one.
Name Type Description
_condition Condition Condition that should be compared
Returns the AttributeType.
Returns the comparison method.
Returns the name.
Returns the comparison value.

setAttributeType(_attributeType)

Sets the attributeType.
Name Type Description
_attributeType AttributeType AttributeType

setComparisonMethod(_comparisonMethod)

Sets the ComparisonMethod.
Name Type Description
_comparisonMethod ConditionMethod comparison Method
Sets the name.
Name Type Description
_name string Name

setReferenceValue(_referenceValue)

Sets the referenceValue.
Name Type Description
_referenceValue * comparison value

withAttributeType(_attributeType){Condition}

Builder for AttributeType.
Name Type Description
_attributeType AttributeType Attributes that would be verified.

withComparisonMethod(_comparisonMethod){Condition}

Builder for comparison method.
Name Type Description
_comparisonMethod ConditionMethod method for comparison
Builder for name.
Name Type Description
_name String Name

withReferenceValue(_referenceValue){Condition}

Builder for comparison value.
Name Type Description
_referenceValue String comparisonValue