The builtin type set.
Sets keep a flag for each item that is present. It's like a dict without
a value.
The item type can be int, string, bool, status and any class that has a
public ToString() method.
|
NEW() @public | Create a new empty set.
|
|
NEW(keys) @public | Create a new set from a list of items.
|
|
$Size()
int @public | Return the number of items in the set.
|
|
$copy()
Set<Tkey> @public | Return a shallow copy of the set.
|
|
$ToString()
string @public | Return a string representation of the set.
|
|
$Iterator()
I.Iterator<Tkey> @file | Return an iterator to iterate over all the keys.
|
|
$has(key)
bool @public | Check if an item is present in the set.
|
|
$keys()
list<Tkey> @public | Return a list with all the keys.
|
|
$add(key)
Set<Tkey> @public | Add an item to the set.
|
|
$addSet(other)
Set<Tkey> @public | Add all items in other to the set.
|
|
$addList(keys)
Set<Tkey> @public | Add a list of items to the set.
|
|
$set(key)
Set<Tkey> @public | Add an item to the set if not yet present.
|
|
$setSet(other)
Set<Tkey> @public | Add all items in other to the set if not yet present.
|
|
$setList(keys)
Set<Tkey> @public | Add all items in the list keys to the set if not yet present.
|
|
$remove(key)
Tkey @public | Remove an item from the set.
|
|
$removeSet(other)
Set<Tkey> @public | Remove all items from the set that are in other.
|
|
$removeNotInSet(other)
Set<Tkey> @public | Remove all items from the set that are not in other.
|
|
$clear()
Set<Tkey> @public | Make the set empty.
|
|
$clear(key)
Set<Tkey> @public | Remove an item from the set if present.
|
|
$union(set)
Set<Tkey> @public | Make a copy of the set and all items in set if not yet present.
|
|
$intersection(other)
Set<Tkey> @public | Find all items present both in this set and other.
|
|
$difference(other)
Set<Tkey> @public | Find items that are not present in other.
|
|