Home

StringMap

Binary tree of string values

Operations

New

Default constructor

New()

Empty

Clears the map

method : public : native : Empty() ~ Nil

Filter

Uses the given function to filter out values

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

Return
TypeDescription
StringMapfilter vector

Find

Searches for a value in a map

method : public : Find(key:String) ~ Base
Parameters
NameTypeDescription
keyStringsearch key

Return
TypeDescription
Basefound value, Nil if not found

GetKeys

Get a collection of keys

method : public : GetKeys() ~ CompareVector
Return
TypeDescription
CompareVectorvector of keys

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:String) ~ Bool
Parameters
NameTypeDescription
keyStringsearch key

Return
TypeDescription
Booltrue if found, false otherwise

Insert

Inserts a value into the map

method : public : Insert(key:String, value:Base) ~ Nil
Parameters
NameTypeDescription
keyStringkey
valueBasevalue

IsEmpty

Checks to see if the map is empty

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

Remove

Removes a value from the map

method : public : Remove(key:String) ~ Bool
Parameters
NameTypeDescription
keyStringkey 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