Instantiate the stack, optionally with a list of items to start from.
The list of linkers to start in this stack (the first is the top)
The type of list to create when no stacked list is given
The class used to hold each stacked item
Iterate over the items from the top of the stack to the bottom, without removing them.
Check whether the stack has no items.
Look at the item on the top of the stack, without removing it.
The item, or null when the stack is empty
Add an item to the top of the stack.
The item to add
This stack, so that adding can be chained
Count the items in the stack.
The item on the top of the stack (the same as peek).
The item, or null when the stack is empty
Staticfrom
A last-in-first-out collection: items are added to the top with push and taken from the top with pop. Any value can be stacked (it is stored as it is, whether it is a function, an object or null), and adding and taking are constant time. To stack tasks which are run as they are taken use TaskStack.