Packagecom.addicted2flash.util
Classpublic class ArrayStack
InheritanceArrayStack Inheritance AbstractArrayCollection
ImplementsIStack

The ArrayStack class represents a last-in-first-out (LIFO) stack of elements.



Public Properties
 PropertyDefined by
 Inheritedlist : Array
return the internal list.
AbstractArrayCollection
Protected Properties
 PropertyDefined by
 Inherited_list : Array
AbstractArrayCollection
Public Methods
 MethodDefined by
  
ArrayStack(field:Array = null)
Create a new ArrayStack
ArrayStack
 Inherited
add(o:*):void
Appends the specified element to the end of this list (optional operation).
AbstractArrayCollection
 Inherited
Adds all of the elements in the specified collection to this collection (optional operation).
AbstractArrayCollection
 Inherited
clear():void
Removes all of the elements from this list (optional operation).
AbstractArrayCollection
  
Returns a copy of the ICollection.
ArrayStack
 Inherited
contains(o:*):Boolean
Returns true if this list contains the specified element.
AbstractArrayCollection
 Inherited
Returns true if this collection contains all of the elements in the specified collection.
AbstractArrayCollection
 Inherited
dispose():void
free memory for garbage collection.
AbstractArrayCollection
 Inherited
getAt(i:int):*
Returns the element at the specified position in this collection.
AbstractArrayCollection
  
indexOf(o:*):int
return index of element in the stack.
ArrayStack
 Inherited
isEmpty():Boolean
Returns true if this list contains no elements.
AbstractArrayCollection
 Inherited
Returns an iterator over the elements in this list.
AbstractArrayCollection
  
peek():*
Looks at the object at the top of this stack without removing it from the stack.
ArrayStack
  
pop():*
removes the element at the top of this stack and returns that object as the value of this function.
ArrayStack
  
push(o:*):*
Pushes an element onto the top of this stack.
ArrayStack
 Inherited
remove(o:*):Boolean
Removes the first occurrence in this list of the specified element (optional operation).
AbstractArrayCollection
 Inherited
Removes a single instance of the specified element from this collection, if it is present (optional operation)
AbstractArrayCollection
 Inherited
size():int
Returns the number of elements in this list.
AbstractArrayCollection
 Inherited
toArray():Array
Converts the collection into an array.
AbstractArrayCollection
  
toString():String
String representation of ArrayStack.
ArrayStack
Constructor detail
ArrayStack()constructor
public function ArrayStack(field:Array = null)

Create a new ArrayStack

Parameters
field:Array (default = null) — (optional) an existing Array
Method detail
clone()method
public override function clone():ICollection

Returns a copy of the ICollection.

Returns
ICollection — a copy of the ICollection
indexOf()method 
public function indexOf(o:*):int

return index of element in the stack. If element doesn't exist, return value is -1;

Parameters
o:*

Returns
int — index of element in the stack
peek()method 
public function peek():*

Looks at the object at the top of this stack without removing it from the stack.

Returns
* — element at the top of this stack
pop()method 
public function pop():*

removes the element at the top of this stack and returns that object as the value of this function.

Returns
* — element at the top of this stack
push()method 
public function push(o:*):*

Pushes an element onto the top of this stack.

Parameters
o:* — item to be pushed onto this stack

Returns
* — item argument
toString()method 
public function toString():String

String representation of ArrayStack.

Returns
String — String representation of ArrayStack