IDictionary - acadet/ludivine GitHub Wiki

IDictionary<K, V>
|> ICollection<KeyValuePair<K, V>>

Dictionary interface. K types keys and V values.

Current implementations

References

Methods

add(key : K, value : V) : void

Adds new key/value pair. Throws error if key is already existing.

Parameters

key Key

value Paired value

get(key : K) : V

Gets value from provided key. Throws error if key does not exist.

key Key

getSize() : number

Returns size of dictionary.

hasKey(key : K) : boolean

Tests if key exists.

Parameters

key Key

remove(key : K) : void

Removes pair from dictionary. Throws error if key does not exist.

Parameters

key Key

removeIf(func : Func<KeyValuePair<K, V>, boolean>) : void

Removes each pair matching provided condition.

Parameters

func Returns true if element has to be removed

⚠️ **GitHub.com Fallback** ⚠️