Options
All
  • Public
  • Public/Protected
  • All
Menu

Generic dictionary class keyed by string

Type parameters

  • T

Hierarchy

  • Dictionary

Implements

Index

Accessors

count

  • get count(): number
  • Gets the number of items in the dictionary

    inheritdoc

    Returns number

keys

  • get keys(): string[]
  • Gets an array of string keys in the dictionary

    inheritdoc

    Returns string[]

values

  • get values(): T[]
  • Gets the array of values in the dictionary

    inheritdoc

    Returns T[]

Methods

add

  • add(key: string, value: T): void
  • Adds a key-value pair to the dictionary

    Parameters

    • key: string

      The string key

    • value: T

      The object value

    Returns void

clear

  • clear(): void
  • Clears the dictionary

    Returns void

containsKey

  • containsKey(key: string): boolean
  • Checks if the dictionary contains an item key

    Parameters

    • key: string

    Returns boolean

item

  • item(key: string): T
  • Gets the item by string key

    Parameters

    • key: string

    Returns T

remove

  • remove(key: string): T
  • Removes an item by string key

    Parameters

    • key: string

    Returns T

Generated using TypeDoc