Class Index | File Index

Classes


Class comb.collections.Stack


Extends comb.collections.Collection.

LIFO Data structure


Defined in: Stack.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
the current number of elements in this queue
 
true if this queue is empty
 
a copy of the values contained in this queue
Method Summary
Method Attributes Method Name and Description
 
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 Fri Nov 18 2011 01:10:52 GMT-0600 (CST)