ArrayList
classin packageklyn.collections
public class ArrayList<T> extends Object implements List<T>:
All Implemented Interfaces: List
Resizable array list.
Native operator mapping:
- `operator[]` is mapped to the native `klyn_collections_ArrayList_operator_index`.
@param <T> Element type.
Properties
| Modifier and Type |
Member |
Description |
| public override readonly native property |
size |
Number of elements in the list. |
Methods
| Modifier and Type |
Member |
Description |
| public native |
add add(item as T) as Void
|
Adds an element at the end. |
| public native |
append append(item as T) as Void
|
Python-style alias for add. |
| public native |
clear clear() as Void
|
Removes all elements. |
| public native |
contains |
Returns true if the list contains the given element. |
| public native |
count |
Counts occurrences of the given element in the list. |
| public native |
join |
Joins elements into a single string using the separator. |
| public native |
remove |
Removes the first matching element. |
| public native |
sort sort() as Void
|
Sorts the list in ascending order. |
| public native |
sortNew |
Returns a new sorted list without modifying the original. |
| public native |
toString |
Returns a string representation of the list. |
Operators