ValueCondition

Defines specific conditional operators as extensions of Condition

Hierarchy

Index

Constructors

constructor

Find examples in Playground
  • 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

Find examples in Playground
operator: number

the conditional operator, default ValueCondition.IsEqual

propertyPath

Find examples in Playground
propertyPath: string

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

value

Find examples in Playground
value: any

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

Static IsDifferent

Find examples in Playground
IsDifferent: number

Returns the number for IsDifferent

Static IsEqual

Find examples in Playground
IsEqual: number

returns the number for IsEqual

Static IsGreater

Find examples in Playground
IsGreater: number

Returns the number for IsGreater

Static IsLesser

Find examples in Playground
IsLesser: number

Returns the number for IsLesser

Methods

isValid

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

    Returns boolean

    the result of the comparison

serialize

Find examples in Playground
  • serialize(): any
  • Serialize the ValueCondition into a JSON compatible object

    Returns any

    serialization object

Static GetOperatorName

Find examples in Playground
  • 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