| Package | system.data |
| Interface | public interface Stack extends Cloneable, Iterable, Serializable |
| Implementors | ArrayStack, TypedStack |
Stacks typically, but do not necessarily, order elements in a LIFO (last-in-first-out) manner.
| Method | Defined By | ||
|---|---|---|---|
clear():void
Removes all of the elements from this stack (optional operation). | Stack | ||
![]() | clone():*
Creates and returns a shallow copy of the object. | Cloneable | |
isEmpty():Boolean
Returns true if this stack contains no elements. | Stack | ||
![]() |
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 | ||
![]() | toSource(indent:int = 0):String
Returns the source code string representation of the object. | Serializable | |
| clear | () | method |
public function clear():voidRemoves all of the elements from this stack (optional operation).
| isEmpty | () | method |
public function isEmpty():Boolean
Returns true if this stack contains no elements.
Boolean — true if this stack is empty else false.
|
| peek | () | method |
public function peek():*Returns the lastly pushed value without removing it.
Returns* |
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:*):voidPushes the passed-in value to this stack.
Parameters
o:* |
| search | () | method |
public function search(o:*):intSearch a value in the stack.
Parameters
o:* |
int — the index position of a value in the stack.
|
| size | () | method |
public function size():uintReturns the number of pushed values.
Returnsuint — the number of pushed values.
|