Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Lookup<K, V>

Type parameters

  • K
  • V

Hierarchy

  • Lookup

Implements

Index

Constructors

Accessors

Methods

Constructors

constructor

  • Creates a new Lookup for the provided groups.

    Parameters

    • entries: Queryable<[K, Queryable<V>]>

      A map containing the unique groups of values.

    • Optional keyEqualer: Equaler<K>

    Returns Lookup

Accessors

size

  • get size(): number
  • Gets the number of unique keys.

    Returns number

Methods

[Symbol.iterator]

applyResultSelector

  • applyResultSelector<R>(selector: function): Iterable<R>
  • Creates a Query that maps each group in the Lookup.

    Type parameters

    • R

    Parameters

    • selector: function

      A callback used to select results for each group.

    Returns Iterable<R>

get

  • Gets the group for the provided key.

    Parameters

    • key: K

      A key.

    Returns Iterable<V>

has

  • has(key: K): boolean
  • Parameters

    • key: K

      A key. Gets a value indicating whether any group has the provided key.

    Returns boolean

Generated using TypeDoc