Haxe API Documentation
Back |
Indexclass haxe.ds.GenericStack<T>
Available in flash8, neko, js, flash, php, cpp
A linked-list of elements. A different class is created for each container used in platforms where it matters
- var head : GenericCell<T>
- function new() : Void
- Creates a new empty list.
- inline function add(item : T) : Void
- Add an element at the head of the list.
- inline function first() : Null<T>
- Returns the first element of the list, or null
if the list is empty.
- inline function isEmpty() : Bool
- Tells if a list is empty.
- function iterator() : Iterator<T>
- Returns an iterator on the elements of the list.
- inline function pop() : Null<T>
- Removes the first element of the list and
returns it or simply returns null if the
list is empty.
- function remove(v : T) : Bool
- Remove the first element that is
== v
from the list.
Returns true
if an element was removed, false
otherwise. - function toString() : String
- Returns a displayable representation of the String.
Back |
Index