Elixir v1.2.6 Dict behaviour

WARNING: this module is deprecated.

If you need a general dictionary, use the Map module. If you need to manipulate keyword lists, use Keyword.

To convert maps into keywords and vice-versa, use the new function in the respective modules.

Summary

Types

key()
key() :: any
t()
t() :: list | map
value()
value() :: any

Functions

delete(dict, key)
delete(t, key) :: t
drop(dict, keys)
drop(t, [key]) :: t
empty(dict)
empty(t) :: t
equal?(dict1, dict2)
equal?(t, t) :: boolean
fetch(dict, key)
fetch(t, key) :: value
fetch!(dict, key)
fetch!(t, key) :: value | no_return
get(dict, key, default \\ nil)
get(t, key, value) :: value
get_and_update(dict, key, fun)
get_and_update(t, key, (value -> {value, value})) :: {value, t}
get_lazy(dict, key, fun)
get_lazy(t, key, (() -> value)) :: value
has_key?(dict, key)
has_key?(t, key) :: boolean
keys(dict)
keys(t) :: [key]
merge(dict1, dict2)
merge(t, t) :: t
merge(dict1, dict2, fun)
merge(t, t, (key, value, value -> value)) :: t
pop(dict, key, default \\ nil)
pop(t, key, value) :: {value, t}
pop_lazy(dict, key, fun)
pop_lazy(t, key, (() -> value)) :: {value, t}
put(dict, key, val)
put(t, key, value) :: t
put_new(dict, key, val)
put_new(t, key, value) :: t
put_new_lazy(dict, key, fun)
put_new_lazy(t, key, (() -> value)) :: t
size(dict)
size(t) :: non_neg_integer
split(dict, keys)
split(t, [key]) :: {t, t}
take(dict, keys)
take(t, [key]) :: t
to_list(dict)
to_list(t) :: list
update(dict, key, initial, fun)
update(t, key, value, (value -> value)) :: t
update!(dict, key, fun)
update!(t, key, (value -> value)) :: t
values(dict)
values(t) :: [value]

Callbacks

delete(t, key)
delete(t, key) :: t
drop(t, arg1)
drop(t, Enum.t) :: t
equal?(t, t)
equal?(t, t) :: boolean
fetch(t, key)
fetch(t, key) :: {:ok, value} | :error
fetch!(t, key)
fetch!(t, key) :: value | no_return
get(t, key)
get(t, key) :: value
get(t, key, value)
get(t, key, value) :: value
get_and_update(t, key, list)
get_and_update(t, key, (value -> {value, value})) :: {value, t}
get_lazy(t, key, list)
get_lazy(t, key, (() -> value)) :: value
has_key?(t, key)
has_key?(t, key) :: boolean
keys(t)
keys(t) :: [key]
merge(t, t)
merge(t, t) :: t
merge(t, t, list)
merge(t, t, (key, value, value -> value)) :: t
new()
new() :: t
pop(t, key)
pop(t, key) :: {value, t}
pop(t, key, value)
pop(t, key, value) :: {value, t}
pop_lazy(t, key, list)
pop_lazy(t, key, (() -> value)) :: {value, t}
put(t, key, value)
put(t, key, value) :: t
put_new(t, key, value)
put_new(t, key, value) :: t
put_new_lazy(t, key, list)
put_new_lazy(t, key, (() -> value)) :: t
size(t)
size(t) :: non_neg_integer
split(t, arg1)
split(t, Enum.t) :: {t, t}
take(t, arg1)
take(t, Enum.t) :: t
to_list(t)
to_list(t) :: list
update(t, key, value, list)
update(t, key, value, (value -> value)) :: t
update!(t, key, list)
update!(t, key, (value -> value)) :: t | no_return
values(t)
values(t) :: [value]