Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GroupedPriorityList<T>

The GroupedPriorityList contains a PriorityListGroupMap to manage a larger number of items in priority groups.

Type parameters

Hierarchy

Index

Properties

Methods

Properties

Readonly groups

groups: PriorityListGroupMap<T> = new Map()

Methods

add

  • add(element: T): void

clear

  • clear(): void

clone

count

  • count(): number

forEach

  • forEach(fun: (element: T) => void): void
  • Apply function to all elements in this GroupedPriorityList.

    Parameters

    • fun: (element: T) => void

      Function to apply.

        • (element: T): void
        • Parameters

          • element: T

          Returns void

    Returns void

merge

remove

  • remove(element: T): boolean
  • Remove an element from the GroupedPriorityList.

    Note: It is required that the priority is the same as it was when the element has been added. Otherwise, the removal will fail.

    Parameters

    • element: T

      Element to be removed.

    Returns boolean

    True if the element was removed, false otherwise.

Generated using TypeDoc