| Package | com.addicted2flash.util |
| Class | public class LinkedStack |
| Inheritance | LinkedStack AbstractLinkedCollection |
| Implements | IStack |
LinkedStack class represents a last-in-first-out (LIFO) stack of elements
implemented with Sequential structure.
| Method | Defined by | ||
|---|---|---|---|
|
Create a new
LinkedStack
| LinkedStack | ||
![]() |
add(o:*):void
Appends the specified element to the end of this list (optional operation).
| AbstractLinkedCollection | |
![]() |
addAll(c:ICollection):void
Adds all of the elements in the specified collection to this collection (optional operation).
| AbstractLinkedCollection | |
![]() |
clear():void
Removes all of the elements from this list (optional operation).
| AbstractLinkedCollection | |
|
Returns a copy of the
ICollection. | LinkedStack | ||
![]() |
contains(o:*):Boolean
Returns true if this list contains the specified element.
| AbstractLinkedCollection | |
![]() |
containsAll(c:ICollection):Boolean
Returns true if this collection contains all of the elements in the specified collection.
| AbstractLinkedCollection | |
![]() |
dispose():void
free memory for garbage collection.
| AbstractLinkedCollection | |
![]() |
getAt(i:int):*
Returns the element at the specified position in this collection.
| AbstractLinkedCollection | |
![]() |
getNodeAt(i:int):LinkedNode
return
LinkedNode at given index. | AbstractLinkedCollection | |
|
indexOf(o:*):int
return index of element in the stack.
| LinkedStack | ||
![]() |
isEmpty():Boolean
Returns true if this list contains no elements.
| AbstractLinkedCollection | |
![]() |
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 | ||
![]() |
remove(o:*):Boolean
Removes the first occurrence in this list of the specified element (optional operation).
| AbstractLinkedCollection | |
![]() |
removeAll(c:ICollection):Boolean
Removes a single instance of the specified element from this collection, if it is present (optional operation)
| AbstractLinkedCollection | |
![]() |
removeNode(n:LinkedNode):void
remove
LinkedNode. | AbstractLinkedCollection | |
![]() |
size():int
Returns the number of elements in this list.
| AbstractLinkedCollection | |
![]() |
toArray():Array
Converts the collection into an array.
| AbstractLinkedCollection | |
|
toString():String
String representation of
LinkedStack. | LinkedStack | ||
| LinkedStack | () | constructor |
public function LinkedStack()
Create a new LinkedStack
| clone | () | method |
public override function clone():ICollection
Returns a copy of the ICollection.
ICollection —
a copy of the ICollection
|
| indexOf | () | method |
public function indexOf(o:*):intreturn index of element in the stack. If element doesn't exist, return value is -1;
Parameterso:* |
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.
Parameterso:* — item to be pushed onto this stack
|
* — item argument
|
| toString | () | method |
public function toString():String
String representation of LinkedStack.
String — String representation of LinkedStack
|