Options
All
  • Public
  • Public/Protected
  • All
Menu

Class 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

operatorSearch playground for operator

operator: number

the conditional operator, default ValueCondition.IsEqual

propertyPathSearch playground for propertyPath

propertyPath: string

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

valueSearch playground for value

value: any

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

Accessors

Static IsDifferent

  • get IsDifferent(): number
  • Returns the number for IsDifferent

    Returns number

Static IsEqual

  • get IsEqual(): number
  • returns the number for IsEqual

    Returns number

Static IsGreater

  • get IsGreater(): number
  • Returns the number for IsGreater

    Returns number

Static IsLesser

  • get IsLesser(): number
  • Returns the number for IsLesser

    Returns number

Methods

isValidSearch playground for isValid

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

    Returns boolean

    the result of the comparison

serializeSearch playground for serialize

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

    Returns any

    serialization object

Static GetOperatorNameSearch playground for 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

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static method