HashDict

A key-value store.

The HashDict is implemented using tries, which grows in space as the number of keys grows, working well with both small and large set of keys. For more information about the functions and their APIs, please consult the Dict module.

Source

Summary

delete(dict, key)

Callback implementation of Dict.delete/2

drop(dict, keys)

Callback implementation of Dict.drop/2

empty(arg1)

Callback implementation of Dict.empty/1

equal?(dict1, dict2)

Callback implementation of Dict.equal?/2

fetch!(dict, key)

Callback implementation of Dict.fetch!/2

fetch(arg1, key)

Callback implementation of Dict.fetch/2

get(dict, key, default \\ nil)

Callback implementation of Dict.get/3

has_key?(dict, key)

Callback implementation of Dict.has_key?/2

keys(dict)

Callback implementation of Dict.keys/1

merge(dict1, dict2, fun \\ fn _k, _v1, v2 -> v2 end)

Callback implementation of Dict.merge/3

new()

Creates a new empty dict

new(enum)

Creates a new dict from the given enumerable

new(enum, transform)

Creates a new dict from the enumerable with the help of the transformation function

pop(dict, key, default \\ nil)

Callback implementation of Dict.pop/3

put(arg1, key, value)

Callback implementation of Dict.put/3

put_new(dict, key, value)

Callback implementation of Dict.put_new/3

reduce(arg1, acc, fun)

Callback implementation of Dict.reduce/3

size(arg1)

Callback implementation of Dict.size/1

split(dict, keys)

Callback implementation of Dict.split/2

take(dict, keys)

Callback implementation of Dict.take/2

to_list(dict)

Callback implementation of Dict.to_list/1

update!(arg1, key, fun)

Callback implementation of Dict.update!/3

update(arg1, key, initial, fun)

Callback implementation of Dict.update/4

values(dict)

Callback implementation of Dict.values/1

Functions

delete(dict, key)

Callback implementation of Dict.delete/2.

Source
drop(dict, keys)

Callback implementation of Dict.drop/2.

Source
empty(arg1)

Callback implementation of Dict.empty/1.

Source
equal?(dict1, dict2)

Callback implementation of Dict.equal?/2.

Source
fetch(arg1, key)

Callback implementation of Dict.fetch/2.

Source
fetch!(dict, key)

Callback implementation of Dict.fetch!/2.

Source
get(dict, key, default \\ nil)

Callback implementation of Dict.get/3.

Source
has_key?(dict, key)

Callback implementation of Dict.has_key?/2.

Source
keys(dict)

Callback implementation of Dict.keys/1.

Source
merge(dict1, dict2, fun \\ fn _k, _v1, v2 -> v2 end)

Callback implementation of Dict.merge/3.

Source
new()

Specs:

Creates a new empty dict.

Source
new(enum)

Specs:

Creates a new dict from the given enumerable.

Examples

HashDict.new [{:b, 1}, {:a, 2}]
#=> #HashDict<[a: 2, b: 1]>
Source
new(enum, transform)

Specs:

  • new(Enum.t, (term -> {key :: term, value :: term})) :: Dict.t

Creates a new dict from the enumerable with the help of the transformation function.

Examples

HashDict.new ["a", "b"], fn x -> {x, x} end
#=> #HashDict<[{"a","a"},{"b","b"}]>
Source
pop(dict, key, default \\ nil)

Callback implementation of Dict.pop/3.

Source
put(arg1, key, value)

Callback implementation of Dict.put/3.

Source
put_new(dict, key, value)

Callback implementation of Dict.put_new/3.

Source
reduce(arg1, acc, fun)

Callback implementation of Dict.reduce/3.

Source
size(arg1)

Callback implementation of Dict.size/1.

Source
split(dict, keys)

Callback implementation of Dict.split/2.

Source
take(dict, keys)

Callback implementation of Dict.take/2.

Source
to_list(dict)

Callback implementation of Dict.to_list/1.

Source
update(arg1, key, initial, fun)

Callback implementation of Dict.update/4.

Source
update!(arg1, key, fun)

Callback implementation of Dict.update!/3.

Source
values(dict)

Callback implementation of Dict.values/1.

Source