Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VariableCollection

Implements a variables list.

Hierarchy

  • VariableCollection

Implements

Index

Accessors

length

  • get length(): number
  • Gets a number of variables stored in the collection.

    Returns number

    a number of stored variables.

Methods

add

  • Adds a new variable to the collection.

    Parameters

    • variable: IVariable

      a variable to be added.

    Returns void

clear

  • clear(): void
  • Clears the collection.

    Returns void

clearValues

  • clearValues(): void
  • Clears all stored variables (assigns null values).

    Returns void

findByName

  • Finds variable in the list by it's name.

    Parameters

    • name: string

      The variable name to be found.

    Returns IVariable

    A variable or null if function was not found.

findIndexByName

  • findIndexByName(name: string): number
  • Finds variable index in the list by it's name.

    Parameters

    • name: string

      The variable name to be found.

    Returns number

    Variable index in the list or -1 if variable was not found.

get

  • Get a variable by its index.

    Parameters

    • index: number

      a variable index.

    Returns IVariable

    a retrieved variable.

getAll

  • Get all variables stores in the collection

    Returns IVariable[]

    a list with variables.

locate

  • Finds variable in the list or create a new one if variable was not found.

    Parameters

    • name: string

      The variable name to be found.

    Returns IVariable

    Found or created variable.

remove

  • remove(index: number): void
  • Removes a variable by its index.

    Parameters

    • index: number

      a index of the variable to be removed.

    Returns void

removeByName

  • removeByName(name: string): void
  • Removes variable by it's name.

    Parameters

    • name: string

      The variable name to be removed.

    Returns void

Generated using TypeDoc