List of generics
OperationsDefault constructor
New()
Adds a value to the end
method : public : native : AddBack(value:H) ~ Nil
Name | Type | Description |
---|---|---|
value | H | value to append |
Adds a value to the front
method : public : native : AddFront(value:H) ~ Nil
Name | Type | Description |
---|---|---|
value | H | value to prepend |
Returns the last element in the list
method : public : Back() ~ H
Type | Description |
---|---|
H | last element in the list, 0.0 if the list is empty |
Instance of a backward iterator
method : public : BackwardIterator() ~ BackwardIterator<H>
Type | Description |
---|---|
BackwardIterator<H> | Backward iterator |
Function called for each element
method : public : Each(f:(H)~Nil) ~ List<H>
Name | Type | Description |
---|---|---|
f | (H)~Nil | function called |
Clears the list
method : public : Empty() ~ Nil
Uses the given function to filter out values
method : public : Filter(f:(H)~Bool) ~ List<H>
Name | Type | Description |
---|---|---|
f | (H)~Bool | function to use a filter. If the function evaluates to true the value is added to the collection. |
Type | Description |
---|---|
List<H> | filtered list |
Moves the pointer to the end of the list
method : public : Forward() ~ Nil
Instance of a forward iterator
method : public : ForwardIterator() ~ ForwardIterator<H>
Type | Description |
---|---|
ForwardIterator<H> | forward iterator |
Returns the first element in the list
method : public : Front() ~ H
Type | Description |
---|---|
H | first element in the list, 0.0 if the list is empty |
Gets the value that's currently pointed to
method : public : Get() ~ H
Type | Description |
---|---|
H | value value |
Inserts a value into the list based upon the pointer location
method : public : native : Insert(value:H) ~ Bool
Name | Type | Description |
---|---|---|
value | H | value to insert |
Checks to see if the pointer is at the end of the list
method : public : IsBack() ~ Bool
Type | Description |
---|---|
Bool | true if pointer is at the end of the list, false otherwise |
Checks to see if the list is empty
method : public : IsEmpty() ~ Bool
Type | Description |
---|---|
Bool | true if empty, false otherwise |
Checks to see if the pointer is at the front of the list
method : public : IsFront() ~ Bool
Type | Description |
---|---|
Bool | true if pointer is at the front of the list, false otherwise |
Returns a limited list
method : public : Limit(l:Int) ~ List<H>
Name | Type | Description |
---|---|---|
l | Int | limit |
Type | Description |
---|---|
List<H> | limited list |
Maps the given function to each value in the list
method : public : Map(f:(H)~H) ~ List<H>
Name | Type | Description |
---|---|---|
f | (H)~H | function to apply |
Type | Description |
---|---|
List<H> | newly calculated list |
Checks to see the pointer can be advanced
method : public : More() ~ Bool
Type | Description |
---|---|
Bool | true if pointer can be advanced, false otherwise |
Advances the pointer
method : public : Next() ~ Nil
Retreats the pointer
method : public : Previous() ~ Nil
Removes the element at the pointer position
method : public : native : Remove() ~ Nil
Removes the last value from the list
method : public : RemoveBack() ~ Nil
Removes the first value from the list
method : public : RemoveFront() ~ Nil
List of all but first element
method : public : Rest() ~ List<H>
Type | Description |
---|---|
List<H> | all but first element |
Moves the pointer to the start of the list
method : public : Rewind() ~ Nil
Size of list
method : public : Size() ~ Int
Type | Description |
---|---|
Int | size of list |