public interface Collection<T = Double>:
A collection of elements. @param <T> The type of elements in the collection.
myCollection = [] # Here an instance of ArrayList<double> myCollection.add(1) myCollection.add(2) print(myCollection.size) # Output: 2 myCollection.remove(1) print(myCollection.size) # Output: 1
| Modifier and Type | Member | Description |
|---|---|---|
| public | addadd(item as T) as Void |
Adds an element to the collection. |
| public | countcount(item as T) as ULong |
Counts occurrences of the specified element in the collection. |
| public | removeremove(item as T) as Boolean |
Removes the first occurrence of the specified element from the collection. |
| public | toStringtoString() as String |
Returns a string representation of the collection. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | operator in(item as T) as Boolean | Determines whether the collection contains the specified element. |