ValueCondition

Defines specific conditional operators as extensions of Condition

Hierarchy

Index

Constructors

constructor

  • Creates a new ValueCondition

    Parameters

    • actionManager: ActionManager

      manager for the action the condition applies to

    • target: any

      for the action

    • propertyPath: string

      path to specify the property of the target the conditional operator uses

    • value: any

      the value compared by the conditional operator against the current value of the property

    • Optional operator: number

      the conditional operator, default ValueCondition.IsEqual

    Returns ValueCondition

Properties

operator

operator: number

the conditional operator, default ValueCondition.IsEqual

propertyPath

propertyPath: string

path to specify the property of the target the conditional operator uses

value

value: any

the value compared by the conditional operator against the current value of the property

Static IsDifferent

IsDifferent: number

Returns the number for IsDifferent

Static IsEqual

IsEqual: number

returns the number for IsEqual

Static IsGreater

IsGreater: number

Returns the number for IsGreater

Static IsLesser

IsLesser: number

Returns the number for IsLesser

Methods

isValid

  • isValid(): boolean
  • Compares the given value with the property value for the specified conditional operator

    Returns boolean

    the result of the comparison

serialize

  • serialize(): any
  • Serialize the ValueCondition into a JSON compatible object

    Returns any

    serialization object

Static GetOperatorName

  • GetOperatorName(operator: number): string
  • Gets the name of the conditional operator for the ValueCondition

    Parameters

    • operator: number

      the conditional operator

    Returns string

    the name

Generated using TypeDoc