Packagecom.addicted2flash.util
Classpublic class LinkedStack
InheritanceLinkedStack Inheritance AbstractLinkedCollection
ImplementsIStack

The LinkedStack class represents a last-in-first-out (LIFO) stack of elements implemented with Sequential structure.



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

Create a new LinkedStack

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 LinkedStack.

Returns
String — String representation of LinkedStack