Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodeCursor<T, P>

Type parameters

  • T

  • P

Hierarchy

Index

Constructors

constructor

  • new NodeCursor<T, P>(pages: readonly P[], index: number, childIndex: number, childCursor: null | Cursor<T>): NodeCursor<T, P>
  • Type parameters

    • T

    • P

    Parameters

    • pages: readonly P[]
    • index: number
    • childIndex: number
    • childCursor: null | Cursor<T>

    Returns NodeCursor<T, P>

Properties

childCursor

childCursor: null | Cursor<T>

childIndex

childIndex: number

index

index: number

Readonly pages

pages: readonly P[]

Methods

delete

  • delete(): void
  • Returns void

hasNext

  • hasNext(): boolean
  • Returns boolean

hasPrevious

  • hasPrevious(): boolean
  • Returns boolean

head

  • head(): T
  • Returns T

isEmpty

  • isEmpty(): boolean
  • Returns boolean

next

  • next(): { done: boolean; value?: T }
  • Returns { done: boolean; value?: T }

    • done: boolean
    • Optional value?: T

nextIndex

  • nextIndex(): number
  • Returns number

Protected Abstract pageCursor

  • pageCursor(page: P): Cursor<T>
  • Parameters

    • page: P

    Returns Cursor<T>

Protected Abstract pageSize

  • pageSize(page: P): number
  • Parameters

    • page: P

    Returns number

previous

  • previous(): { done: boolean; value?: T }
  • Returns { done: boolean; value?: T }

    • done: boolean
    • Optional value?: T

previousIndex

  • previousIndex(): number
  • Returns number

Protected Abstract reversePageCursor

  • reversePageCursor(page: P): Cursor<T>
  • Parameters

    • page: P

    Returns Cursor<T>

set

  • set(newValue: T): void
  • Parameters

    • newValue: T

    Returns void

skip

  • skip(count: number): void
  • Parameters

    • count: number

    Returns void

step

  • step(): void
  • Returns void

Static array

  • array<T>(array: readonly T[], index?: number, limit?: number): Cursor<T>
  • Type parameters

    • T

    Parameters

    • array: readonly T[]
    • Optional index: number
    • Optional limit: number

    Returns Cursor<T>

Static empty

  • Type parameters

    • T

    Returns Cursor<T>

Static unary

  • unary<T>(value: T): Cursor<T>
  • Type parameters

    • T

    Parameters

    • value: T

    Returns Cursor<T>

Generated using TypeDoc