Package | ch.capi.data |
Class | public class StackList |
Inheritance | StackList ArrayList |
Implements | IStack |
IStack
object.
Property | Defined by | ||
---|---|---|---|
length : int
Defines the number of elements contained into
the
ArrayList . | ArrayList | ||
nextElement : * [read-only]
Defines the next element that will be removed
from the data structure.
| StackList |
Method | Defined by | ||
---|---|---|---|
StackList(initialData:Array = null)
Creates a new
StackList object. | StackList | ||
add(element:*):void
Add an element to the data structure.
| StackList | ||
addElement(element:*):void
Add an element into the
ArrayList . | ArrayList | ||
addElementAt(element:*, index:int):void
Add an element into the
ArrayList at the specified index. | ArrayList | ||
clear():void
Removes all the elements contained into this
ArrayList . | ArrayList | ||
getElementAt(index:int):*
Get the element at the specified index.
| ArrayList | ||
getElementIndex(element:*):int
Get the index of the specified element.
| ArrayList | ||
getTopElement():*
Get the top element of the
StackList . | StackList | ||
isEmpty():Boolean
Get if the structure is empty or not.
| ArrayList | ||
remove():*
Removes the last element of the
StackList . | StackList | ||
removeElement(element:*):void
Removes an element from the
ArrayList . | ArrayList | ||
removeElementAt(index:int):*
Removes the element at the specified index from the
ArrayList . | ArrayList | ||
toArray():Array
Retrieves an
Array from the ArrayList . | ArrayList | ||
toString():String
Displays the
ArrayList into a String . | ArrayList |
nextElement | property |
nextElement:*
[read-only]Defines the next element that will be removed from the data structure.
Implementation public function get nextElement():*
StackList | () | constructor |
public function StackList(initialData:Array = null)
Creates a new StackList
object.
initialData:Array (default = null ) — The Array with the elements to initialize. All the elements
contained into the Array will be added into the StackList .
|
add | () | method |
public function add(element:*):void
Add an element to the data structure.
Parameterselement:* — The element to add.
|
getTopElement | () | method |
public function getTopElement():*
Get the top element of the StackList
.
* — The top element.
|
remove | () | method |
public function remove():*
Removes the last element of the StackList
.
* — The element removed.
|