ProductBuffer object reference

Description

A list of products. Usually owned by a Module.

Properties

Property nameTypeInfo
sizeintegerThe number of objects in the buffer. (Read-only)
emptybooleanTrue if the buffer is empty, otherwise false.
frontProductThe first object in the buffer (or null).
backProductThe last object in the buffer (or null).

Methods

Method nameInfoReturn value
get(integer)Gets the object stored at an index.Product (or null for invalid indices).
push(Product)Inserts an object to the back of the buffer.None.
insert(integer,Product)Inserts an object before the specified index.None.
popBack()Pops the last object in the buffer.None.
popFront()Pops the first object in the buffer.None.
erase(integer)Erases the object at the specified index from the list.None.

Examples

See dummyModule.js