Options
All
  • Public
  • Public/Protected
  • All
Menu

Class b2GrowableBuffer<T>

Type parameters

  • T

Hierarchy

  • b2GrowableBuffer

Index

Constructors

constructor

  • Parameters

    • allocator: () => T
        • (): T
        • Returns T

    Returns b2GrowableBuffer

Properties

allocator

allocator: () => T

Type declaration

    • (): T
    • Returns T

capacity

capacity: number = 0

count

count: number = 0

data

data: T[] = []

Methods

Append

  • Append(): number
  • Returns number

Data

  • Data(): T[]
  • Returns T[]

Free

  • Free(): void
  • Returns void

GetCapacity

  • GetCapacity(): number
  • Returns number

GetCount

  • GetCount(): number
  • Returns number

Grow

  • Grow(): void
  • Returns void

RemoveIf

  • RemoveIf(pred: (t: T) => boolean): void
  • Parameters

    • pred: (t: T) => boolean
        • (t: T): boolean
        • Parameters

          • t: T

          Returns boolean

    Returns void

Reserve

  • Reserve(newCapacity: number): void
  • Parameters

    • newCapacity: number

    Returns void

SetCount

  • SetCount(newCount: number): void
  • Parameters

    • newCount: number

    Returns void

Shorten

  • Shorten(newEnd: number): void
  • Parameters

    • newEnd: number

    Returns void

Unique

  • Unique(pred: (a: T, b: T) => boolean): void
  • Parameters

    • pred: (a: T, b: T) => boolean
        • (a: T, b: T): boolean
        • Parameters

          • a: T
          • b: T

          Returns boolean

    Returns void

Generated using TypeDoc