Class: SizeLimitedStack

SizeLimitedStack(size)

A stack class with limited size.

Constructor

new SizeLimitedStack(size)

Parameters:
Name Type Description
size number

The max on the number of items.

Source:

Extends

Members

items

The number of items in the stack.

Inherited From:
Source:

Methods

add(…items) → {undefined}

Add an item to the stack. Note: Items that are pushed off the front are lost.

Parameters:
Name Type Attributes Description
items * <repeatable>

The items to add.

Overrides:
Source:
Returns:
Type
undefined

remove() → {*}

Remove an item from the stack.

Inherited From:
Source:
Returns:

The item.

Type
*