Packagesystem.data
Interfacepublic interface Stack extends Cloneable, Iterable, Serializable
Implementors ArrayStack, TypedStack

A collection designed for holding elements prior to processing.

Stacks typically, but do not necessarily, order elements in a LIFO (last-in-first-out) manner.



Public Methods
 MethodDefined By
  
clear():void
Removes all of the elements from this stack (optional operation).
Stack
 Inherited
clone():*
Creates and returns a shallow copy of the object.
Cloneable
  
isEmpty():Boolean
Returns true if this stack contains no elements.
Stack
 Inherited
Returns the iterator reference of the object.
Iterable
  
peek():*
Returns the lastly pushed value without removing it.
Stack
  
pop():*
Removes and returns the lastly pushed value.
Stack
  
push(o:*):void
Pushes the passed-in value to this stack.
Stack
  
search(o:*):int
Search a value in the stack.
Stack
  
size():uint
Returns the number of pushed values.
Stack
 Inherited
toSource(indent:int = 0):String
Returns the source code string representation of the object.
Serializable
Method Detail
clear()method
public function clear():void

Removes all of the elements from this stack (optional operation).

isEmpty()method 
public function isEmpty():Boolean

Returns true if this stack contains no elements.

Returns
Booleantrue if this stack is empty else false.
peek()method 
public function peek():*

Returns the lastly pushed value without removing it.

Returns
*

Throws
the — lastly pushed value.
pop()method 
public function pop():*

Removes and returns the lastly pushed value.

Returns
* — the lastly pushed value
push()method 
public function push(o:*):void

Pushes the passed-in value to this stack.

Parameters

o:*

search()method 
public function search(o:*):int

Search a value in the stack.

Parameters

o:*

Returns
int — the index position of a value in the stack.
size()method 
public function size():uint

Returns the number of pushed values.

Returns
uint — the number of pushed values.