public class ImmutableList<T> extends Object implements IList<T>:
Immutable homogeneous ordered collection.
values as IList<Int> = i:[10, 20, 30] print(values[1]) # 20
@param <T> Element type.
| Modifier and Type | Member | Description |
|---|---|---|
| public override readonly native property | sizesize as ULong |
Number of elements in this list. |
| Modifier and Type | Member | Description |
|---|---|---|
| public native | ImmutableListImmutableList(values as IList<T> = []) |
Builds an immutable list by copying the provided read-only list. |
| Modifier and Type | Member | Description |
|---|---|---|
| public override | countcount(item as T) as ULong: |
Counts occurrences of the given value. |
| public override | join | Joins list values with a separator. |
| public native | sortNewsortNew() as ImmutableList<T> |
Returns a sorted immutable copy of this list. |
| public native override | toStringtoString() as String |
Returns a normalized textual representation using the immutable literal syntax. |
| Modifier and Type | Member | Description |
|---|---|---|
| public override | operator in(item as T) as Boolean: | Returns true when the list contains the given value. |
| public override readonly native | operator[](index as Int) as T | Returns the value at the given index. |