@twinfinity/core
    Preparing search index...

    Class BidirectionalMap<K, T>

    Biderctional map. Its a normal map but by using the reverse property it is possible to perform lookups in the "reverse" direction.

    Type Parameters

    • K
    • T

    Implements

    Index

    Constructors

    Accessors

    • get "[toStringTag]"(): string

      See Map

      Returns string

    • get size(): number

      See Map

      Returns number

    Methods

    • See Map

      Returns MapIterator<[K, T]>

    • See Map

      Returns void

    • See Map

      Parameters

      • key: K

      Returns boolean

    • See Map

      Returns MapIterator<[K, T]>

    • See Map

      Parameters

      • callbackfn: (value: T, key: K, map: Map<K, T>) => void
      • OptionalthisArg: any

      Returns void

    • See Map

      Parameters

      • key: K

      Returns undefined | T

    • If key exists returns the existing value. Otherwise factory is called and the resulting value is added to the key.

      Parameters

      • key: K

        Key to check for value

      • factory: (key: K) => T

        Factory which creates value if key does not exist in map.

      Returns T

      value for key

    • See Map

      Parameters

      • key: K

      Returns boolean

    • See Map

      Returns MapIterator<K>

    • See Map

      Parameters

      • key: K
      • value: T

      Returns this

    • See Map

      Returns MapIterator<T>