| Package | system.data.stacks |
| Class | public class ArrayStack |
| Inheritance | ArrayStack ArrayCollection Object |
| Implements | Stack |
import system.data.stacks.ArrayStack ;
var stack:ArrayStack = new ArrayStack(["item1", "item2"]) ;
stack.push("item3") ;
trace("toSource : " + stack.toSource()) ;
trace("pop : " + stack.pop()) ;
trace("stack : " + stack) ;
| Method | Defined By | ||
|---|---|---|---|
ArrayStack(init:* = null)
Creates a new SimpleStack instance. | ArrayStack | ||
![]() | add(o:*):Boolean
Inserts an element in the collection. | ArrayCollection | |
![]() | addAll(c:Collection):Boolean
Appends all of the elements in the specified collection to the end of this Collection, in the order that they are returned by the specified collection's iterator (optional operation). | ArrayCollection | |
![]() | clear():void
Removes all elements in the collection. | ArrayCollection | |
clone():* [override]
Returns a shallow copy of this object. | ArrayStack | ||
![]() | contains(o:*):Boolean
Returns true if this collection contains the specified element. | ArrayCollection | |
![]() | containsAll(c:Collection):Boolean
Returns true if this collection contains all of the elements of the specified collection. | ArrayCollection | |
![]() | equals(o:*):Boolean
Compares the specified object with this object for equality. | ArrayCollection | |
![]() | get(key:*):*
Returns the element from this collection at the passed key index. | ArrayCollection | |
![]() | indexOf(o:*, fromIndex:uint = 0):int
Returns the index of an element in the collection. | ArrayCollection | |
![]() | isEmpty():Boolean
Returns true if this collection contains no elements. | ArrayCollection | |
![]() |
Returns the iterator reference of the object. | ArrayCollection | |
peek():*
Looks at the object at the top of this stack without removing it from the stack. | ArrayStack | ||
pop():*
Removes the object at the top of this stack and returns that object as the value of this function. | ArrayStack | ||
push(o:*):void
Pushes an item into the top of this stack. | ArrayStack | ||
![]() | remove(o:*):*
Removes a single instance of the specified element from this collection, if it is present (optional operation). | ArrayCollection | |
![]() | removeAll(c:Collection):Boolean
Removes from this Collection all the elements that are contained in the specified Collection (optional operation). | ArrayCollection | |
![]() | retainAll(c:Collection):Boolean
Retains only the elements in this Collection that are contained in the specified Collection (optional operation). | ArrayCollection | |
search(o:*):int
Returns the index of an element in the Stack. | ArrayStack | ||
![]() | size():uint
Returns the number of elements in this collection. | ArrayCollection | |
![]() | toArray():Array
Returns an array containing all of the elements in this collection. | ArrayCollection | |
![]() | toSource(indent:int = 0):String
Returns the source code string representation of the object. | ArrayCollection | |
![]() | toString():String
Returns the string representation of this instance. | ArrayCollection | |
| ArrayStack | () | Constructor |
public function ArrayStack(init:* = null)Creates a new SimpleStack instance.
Parametersinit:* (default = null) — An optional Array or Collection to fill the collection.
|
| clone | () | method |
override public function clone():*Returns a shallow copy of this object.
Returns* — a shallow copy of this object.
|
| peek | () | method |
public function peek():*Looks at the object at the top of this stack without removing it from the stack.
Returns* |
| pop | () | method |
public function pop():*Removes the object at the top of this stack and returns that object as the value of this function.
Returns* — the removed object value.
|
| push | () | method |
public function push(o:*):voidPushes an item into the top of this stack.
Parameters
o:* |
| search | () | method |
public function search(o:*):intReturns the index of an element in the Stack.
Parameters
o:* |
int — the index of an element in the Stack.
|