js-util

Home > rc-js-util > CircularBuffer

CircularBuffer class

Presents an array as if it were circular, going past the end or start loops around.

Signature:

export declare class CircularBuffer<TValue> 

Remarks

Supports negative indexes.

Constructors

Constructor Modifiers Description
(constructor)(values)   Constructs a new instance of the CircularBuffer class

Properties

Property Modifiers Type Description
size   number  

Methods

Method Modifiers Description
clone()    
createEmpty(size) static  
createOne(initialValues) static  
getSetValue(index, value)   returns the value stored at the index and sets the provided value
getValue(index)    
setValue(index, value)