Class Index | File Index

## Classes

- _global_
- comb
- comb.array
- comb.characters
- comb.collections
- comb.collections.AnderssonTree
- comb.collections.AVLTree
- comb.collections.BinaryTree
- comb.collections.Collection
- comb.collections.HashTable
- comb.collections.Heap
- comb.collections.Iterable
- comb.collections.MaxHeap
- comb.collections.MinHeap
- comb.collections.Pool
- comb.collections.PriorityQueue
- comb.collections.Queue
- comb.collections.RedBlackTree
- comb.collections.Stack
- comb.collections.Tree
- comb.date
- comb.logging
- comb.logging.appenders
- comb.logging.appenders.Appender
- comb.logging.appenders.ConsoleAppender
- comb.logging.appenders.FileAppender
- comb.logging.appenders.JSONAppender
- comb.logging.appenders.RollingFileAppender
- comb.logging.BasicConfigurator
- comb.logging.Level
- comb.logging.Logger
- comb.logging.PropertyConfigurator
- comb.number
- comb.plugins
- comb.plugins.Broadcaster
- comb.plugins.Middleware
- comb.Promise
- comb.PromiseList
- comb.regexp
- comb.string

# Class comb.collections.Stack

Extends comb.collections.Collection.

LIFO Data structure

Defined in: Stack.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| comb.collections.Stack()

Field Summary
Field Attributes | Field Name and Description
--- | ---
| count the current number of elements in this queue
| isEmpty true if this queue is empty
| values a copy of the values contained in this queue

Method Summary
Method Attributes | Method Name and Description
--- | ---
| clear() Removes all items from this stack.
| contains(obj) Determine if this stack contains the element
| peek() Retrieves the item at the tail of the stack without removing it
| pop() Removes the tail of this static
| push(data) Add an item to the tail of this stack
| remove(obj) Removes an element from this stack.

Methods borrowed from class comb.collections.Collection:
  concat, indexOf, join, lastIndexOf, slice, toString

Class Detail
comb.collections.Stack()
Field Detail
{Number} count
the current number of elements in this queue

{Boolean} isEmpty
true if this queue is empty

{Array} values
a copy of the values contained in this queue
Method Detail
clear()
Removes all items from this stack.

{Boolean} contains(obj)
Determine if this stack contains the element

Parameters:
{*} obj
  the object to find

Returns:
  {Boolean} true if this stack contains the element

{*} peek()
Retrieves the item at the tail of the stack without removing it

Returns:
  {*} The element at the tail of the stack. Returns undefined if the stack is empty.

{*} pop()
Removes the tail of this static

Returns:
  {*} the data at the tail of this stack

push(data)
Add an item to the tail of this stack

Parameters:
{*} data
  item to qppend to this stack

{Boolean} remove(obj)
Removes an element from this stack.

Parameters:
{*} obj
  the data to remove.

Returns:
  {Boolean} true if the element was removed, false otherwise.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 25 2011 13:20:06 GMT-0500 (CDT)