Used for ordering a list of items by "priority". Higher priorities come before lower priorities.

Type Parameters

  • T

Hierarchy

  • PriorityMap

Constructors

Accessors

  • get size(): number
  • Returns number

Methods

  • Parameters

    • priority: number

    Returns boolean

  • Returns Record<number, T>

  • Parameters

    • priority: number

    Returns undefined | T

  • Parameters

    • priority: number
    • orDefault: ((priority: number) => T)
        • (priority: number): T
        • Parameters

          • priority: number

          Returns T

    • Optional assign: boolean

    Returns T

  • Parameters

    • priority: number
    • Optional orDefault: ((priority: number) => T)
        • (priority: number): T
        • Parameters

          • priority: number

          Returns T

    • Optional assign: boolean

    Returns undefined | T

  • Retains the entries from this set that match the given predicate function, any other entries will be deleted.

    Returns

    whether any entries remain.

    Parameters

    • predicate: ((val: T, key: number) => any)

      A predicate that takes a key and a value, and returns a value which will be checked for truthiness.

        • (val: T, key: number): any
        • Parameters

          • val: T
          • key: number

          Returns any

    Returns boolean

  • If this map contains the given key, checks whether the entry matches the given predicate. If it does, it is kept. If not, it's deleted.

    Returns

    whether any entries remain in this map.

    Parameters

    • key: number
    • predicate: ((val: T, key: number) => any)

      A predicate that takes a key and a value, and returns a value which will be checked for truthiness.

        • (val: T, key: number): any
        • Parameters

          • val: T
          • key: number

          Returns any

    Returns boolean

  • Returns an iterator of the items in this list.

    Parameters

    Returns Stream<T>

  • Type Parameters

    • T extends Iterable<any>

    Parameters

    Returns T[]

Generated using TypeDoc