@bedrock-oss/bedrock-boost
    Preparing search index...

    Class UniquePulseScheduler<T>

    Represents a PulseScheduler that only adds unique items to the schedule.

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new UniquePulseScheduler instance.

      Type Parameters

      • T

      Parameters

      • processor: (t: T) => void
      • period: number

        The period of the scheduler.

      • OptionalequalityFunction: (a: T, b: T) => boolean

      Returns UniquePulseScheduler<T>

    Properties

    items: T[]
    processor: (t: T) => void

    Methods

    • Adds an item to the schedule.

      Parameters

      • item: T

        The item to be added.

      Returns void

      Use push instead.

    • Adds multiple items to the schedule.

      Parameters

      • items: T[]

        The items to be added.

      Returns void

      Use push instead.

    • Returns a list of the items in the schedule.

      Returns readonly T[]

    • Returns undefined | T

    • Parameters

      • ...items: T[]

      Returns number

    • Removes an item from the schedule at the specified index.

      Parameters

      • index: number

        The index of the item to remove.

      Returns void

    • Removes items from the schedule that satisfy the given predicate.

      Parameters

      • predicate: (t: T) => boolean

        The predicate function used to determine if an item should be removed.

      Returns void

    • Parameters

      • start: number
      • OptionaldeleteCount: number

      Returns T[]

    • Parameters

      • start: number
      • deleteCount: number
      • ...items: T[]

      Returns T[]

    • Starts the schedule.

      Returns void

    • Stops the schedule.

      Returns void

    • Parameters

      • ...items: T[]

      Returns number