Home

IntSet

Set of int values

Operations

New

Default constructor

New()

Empty

Clears the set

method : public : Empty() ~ Nil

Filter

Uses the given function to filter out values

method : public : Filter(f:(Int)~Bool) ~ IntSet
Parameters
NameTypeDescription
f(Int)~Boolfunction to use a filter. If the function evaluates to true the value is added to the collection.

Return
TypeDescription
IntSetfilter vector

GetKeys

Get a collection of keys

method : public : native : GetKeys() ~ IntVector
Return
TypeDescription
IntVectorvector of keys

Has

Checks for key in set

method : public : Has(key:Int) ~ Bool
Parameters
NameTypeDescription
keyIntsearch key

Return
TypeDescription
Booltrue if found, false otherwise

Insert

Inserts a key into the set

method : public : Insert(key:Int) ~ Nil
Parameters
NameTypeDescription
keyIntkey

IsEmpty

Checks to see if the map is empty

method : public : native : IsEmpty() ~ Bool
Return
TypeDescription
Booltrue if empty, false otherwise

Remove

Removes a key from the set

method : public : Remove(key:Int) ~ Bool
Parameters
NameTypeDescription
keyIntkey for value to remove

Return
TypeDescription
Booltrue if removed, false otherwise

Size

Size of map

method : public : native : Size() ~ Int
Return
TypeDescription
Intsize of queue