Packagecom.boostworthy.collections
Classpublic class Stack
ImplementsICollection, IDisposable
SubclassesTweenStack

Stores data in a 'first on, last off' fashion. Each element placed in this collection can be of any data type.

See also

com.boostworthy.collections.ICollection


Public Properties
 PropertyDefined by
  length : uint
[read-only] Gets the length of this collection.
Stack
Protected Properties
 PropertyDefined by
  m_aData : Array
Array for storing all data in this collection.
Stack
Public Methods
 MethodDefined by
  
Constructor.
Stack
  
addElement(objElement:Object):void
Adds a new element to this object's collection.
Stack
  
dispose():void
Performs any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to 'null', etc.
Stack
  
getIterator(uIterator:uint = 2):IIterator
Returns an iterator of the specified type.
Stack
  
removeElement(objElement:Object):void
Removes an element from this object's collection.
Stack
Property detail
lengthproperty
length:uint  [read-only]

Gets the length of this collection.

Implementation
    public function get length():uint
m_aDataproperty 
protected var m_aData:Array

Array for storing all data in this collection.

Constructor detail
Stack()constructor
public function Stack()

Constructor.

Method detail
addElement()method
public function addElement(objElement:Object):void

Adds a new element to this object's collection.

Parameters
objElement:Object — The element to add to this object.
dispose()method 
public function dispose():void

Performs any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to 'null', etc.

getIterator()method 
public function getIterator(uIterator:uint = 2):IIterator

Returns an iterator of the specified type.

Parameters
uIterator:uint (default = 2) — The iterator type to use for iterating through the data being stored by this collection. Default is '2' (IteratorType.ARRAY_FORWARD).

Returns
IIterator — An iterator instance of the specified type.

See also

removeElement()method 
public function removeElement(objElement:Object):void

Removes an element from this object's collection.

Parameters
objElement:Object — The element to remove from this object.