- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
API Reference
List struct build on top of an array.
Parameters:
| Name | Type | Description | 
|---|---|---|
| [array] | *[] | Optional. Array to make the ArrayList from. | 
array : *[]
Can be used with an accessor or as a reference, points to the same array for full lifecycle.
Type: *[]
Adds a new value to the ArrayList, will be added at the end.
Parameters:
| Name | Type | Description | 
|---|---|---|
| ...value | * | Multiple. Value(s) to add to the ArrayList. | 
Removes the value at a specific position within the ArrayList.
Parameters:
| Name | Type | Description | 
|---|---|---|
| pos | real | Position of value to delete. | 
Adds the given value into the list at the given position, values after will be shifted.
Parameters:
| Name | Type | Description | 
|---|---|---|
| pos | real | Position to add the value from 0 to size-1. | 
| value | * | Value to add to the list. | 
Returns the number of items in the ArrayList.
Returns: real
Checks the ArrayList for a value.
Parameters:
| Name | Type | Description | 
|---|---|---|
| value | * | Value to find. | 
Returns: real
Index of value found in ArrayList, -1 if value doesn't exist.
Clears all data from the ArrayList making array size to 0.
Checks the ArrayList to see if it is empty.
Returns: bool
Modifies the ArrayList, sorting it with the quicksort algorithm (strings sorted alphabetically).
Parameters:
| Name | Type | Description | 
|---|---|---|
| ascending | bool | Whether the values should be ascending (true) or descending (false) order. | 
Swaps the values in pos1 and pos2.
Parameters:
| Name | Type | Description | 
|---|---|---|
| pos1 | real | Position of value to swap with the value of pos2. | 
| pos2 | real | Position of value to swap with the value of pos1. | 
Reorders all the values into random positions.
Reverses the order of the elements in the ArrayList.
Copies the contents of one ArrayList into another.
Parameters:
| Name | Type | Description | 
|---|---|---|
| source | ArrayList | ArrayList to be copied from. | 
clone() ➞ ArrayList
Returns a shallow copy of this ArrayList.
Returns: ArrayList