Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Collector<K, T>

收集共享公用键的项.

Type parameters

  • K

  • T

Hierarchy

  • Collector

Index

Constructors

constructor

Properties

collections

collections: ICollection<K, T>[] = []

Methods

addItemToCollection

  • addItemToCollection(key: K, item: T): void
  • Parameters

    • key: K
    • item: T

    Returns void

findCollection

  • findCollection(key: K, action?: (index: number) => void): T[]
  • Parameters

    • key: K
    • Optional action: (index: number) => void
        • (index: number): void
        • Parameters

          • index: number

          Returns void

    Returns T[]

getCollectionsOfMultiple

  • getCollectionsOfMultiple(cb: (key: K, items: T[]) => void): void
  • Parameters

    • cb: (key: K, items: T[]) => void
        • (key: K, items: T[]): void
        • Parameters

          • key: K
          • items: T[]

          Returns void

    Returns void

removeCollection

  • removeCollection(key: K): boolean
  • Parameters

    • key: K

    Returns boolean

removeItemFromCollection

  • removeItemFromCollection(key: K, item: T): boolean
  • Parameters

    • key: K
    • item: T

    Returns boolean

Generated using TypeDoc