Home

IntMap

Binary tree of integer values

Operations

New

Default constructor

New()

Empty

Clears the map

method : public : Empty() ~ Nil

Filter

Uses the given function to filter out values

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

Return
TypeDescription
IntMapfilter vector

Find

Searches for a value in a map

method : public : Find(key:Int) ~ Base
Parameters
NameTypeDescription
keyIntsearch key

Return
TypeDescription
Basefound value, 0 if not found

GetKeys

Get a collection of keys

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

GetMap

Gets the backing Compare map

method : public : GetMap() ~ Map
Return
TypeDescription
Mapbacking Compare map

GetValues

Gets a collection of values

method : public : GetValues() ~ Vector
Return
TypeDescription
Vectorvector of values

Has

Checks for a value in a map

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

Return
TypeDescription
Booltrue if found, false otherwise

Insert

Inserts a value into the map

method : public : Insert(key:Int, value:Base) ~ Nil
Parameters
NameTypeDescription
keyIntkey
valueBasevalue

IsEmpty

Checks to see if the map is empty

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

Remove

Removes a value from the map

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 : Size() ~ Int
Return
TypeDescription
Intsize of queue