UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

137 lines (62 loc) 1.85 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [CircularFIFOStack](./rc-js-util.circularfifostack.md) ## CircularFIFOStack class Circular first in first out stack. **Signature:** ```typescript export declare class CircularFIFOStack<TValue> implements IFIFOStack<TValue> ``` **Implements:** [IFIFOStack](./rc-js-util.ififostack.md)<!-- -->&lt;TValue&gt; ## Remarks See [ECircularStackOverflowMode](./rc-js-util.ecircularstackoverflowmode.md) for details of overflow behavior. ## Constructors <table><thead><tr><th> Constructor </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [(constructor)(capacity, mode)](./rc-js-util.circularfifostack._constructor_.md) </td><td> </td><td> Constructs a new instance of the `CircularFIFOStack` class </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [getCapacity()](./rc-js-util.circularfifostack.getcapacity.md) </td><td> </td><td> </td></tr> <tr><td> [getIsEmpty()](./rc-js-util.circularfifostack.getisempty.md) </td><td> </td><td> </td></tr> <tr><td> [getRemainingCapacity()](./rc-js-util.circularfifostack.getremainingcapacity.md) </td><td> </td><td> </td></tr> <tr><td> [pop()](./rc-js-util.circularfifostack.pop.md) </td><td> </td><td> Remove the bottom element in the stack and return it. </td></tr> <tr><td> [push(value)](./rc-js-util.circularfifostack.push.md) </td><td> </td><td> Pushes a value to the top of the stack (depending on `mode`<!-- -->). </td></tr> </tbody></table>