Set
interface in package klyn.collections

    public interface Set<T> extends Collection<T>:

Collection
└ Set

Unordered collection of unique elements.

A set contains no duplicate items. Implementations must ensure uniqueness.

Example:

    s = HashSet<Int>()
    s.add(10)
    s.add(10)
    assert s.size == 1
    assert 10 in s

@param <T> Element type.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | count `count(item as T) as ULong` | Counts occurrences of the given element in the set.

Methods inherited from Collection: add, remove, toString
Operators

Modifier and Type | Member | Description
--- | --- | ---
public | operator in(item as T) as Boolean | Returns true if the set contains the given element.