Class SlidingWindow

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(source: ISlidingWindowSource, window: Array<any>, defaultValue: any, sourceLength?: number): SlidingWindow

Parameters

Returns

SlidingWindow

Properties

private _pinCount: any

public currentRelativeItemIndex: number

private defaultValue: any

private firstPinnedAbsoluteIndex: any

private source: any

private sourceLength: any

public window: Array<any>

public windowAbsoluteStartIndex: number

public windowCount: number

Methods

public absoluteIndex(): number

Returns

number

private addMoreItemsToWindow(argument: any): any

Parameters

  • argument: any

Returns

any

public currentItem(argument: any): any

Parameters

  • argument: any

Returns

any

public disgardAllItemsFromCurrentIndexOnwards()

public getAndPinAbsoluteIndex(): number

Returns

number

public isAtEndOfSource(): boolean

Returns

boolean

public moveToNextItem()

public peekItemN(n: number): any

Parameters

  • n: number

Returns

any

public pinCount(): number

Returns

number

public releaseAndUnpinAbsoluteIndex(absoluteIndex: number)

Parameters

  • absoluteIndex: number

public rewindToPinnedIndex(absoluteIndex: number)

Parameters

  • absoluteIndex: number

public setAbsoluteIndex(absoluteIndex: number)

Parameters

  • absoluteIndex: number

private tryShiftOrGrowWindow(): any

Returns

any

private windowAbsoluteEndIndex(): any

Returns

any