| Package | com.addicted2flash.util |
| Interface | public interface IStack extends ICollection, IDisposable |
| Implementors | ArrayStack, LinkedStack |
| Method | Defined by | ||
|---|---|---|---|
![]() |
add(o:*):void
Appends the specified element to the end of this list (optional operation).
| ICollection | |
![]() |
addAll(c:ICollection):void
Adds all of the elements in the specified collection to this collection (optional operation).
| ICollection | |
![]() |
clear():void
Removes all of the elements from this list (optional operation).
| ICollection | |
![]() |
Returns a copy of the
ICollection. | ICollection | |
![]() |
contains(o:*):Boolean
Returns true if this list contains the specified element.
| ICollection | |
![]() |
containsAll(c:ICollection):Boolean
Returns true if this collection contains all of the elements in the specified collection.
| ICollection | |
![]() |
dispose():void
free memory for garbage collection.
| IDisposable | |
![]() |
getAt(i:int):*
Returns the element at the specified position in this collection.
| ICollection | |
|
indexOf(o:*):int
return index of element in the stack.
| IStack | ||
![]() |
isEmpty():Boolean
Returns true if this list contains no elements.
| ICollection | |
![]() |
Returns an iterator over the elements in this list.
| ICollection | |
|
peek():*
Looks at the object at the top of this stack without removing it from the stack.
| IStack | ||
|
pop():*
removes the element at the top of this stack and returns that object as the value of this function.
| IStack | ||
|
push(o:*):*
Pushes an element onto the top of this stack.
| IStack | ||
![]() |
remove(o:*):Boolean
Removes the first occurrence in this list of the specified element (optional operation).
| ICollection | |
![]() |
removeAll(c:ICollection):Boolean
Removes a single instance of the specified element from this collection, if it is present (optional operation)
| ICollection | |
![]() |
size():int
Returns the number of elements in this list.
| ICollection | |
![]() |
toArray():Array
Converts the collection into an array.
| 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
|
— if stack is empty
|
| 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
|
— if stack is empty
|
| 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
|