Module ec_orddict

This provides an implementation of the ec_dictionary type using erlang orddicts as a base.

Copyright © 2011 Erlware, LLC.

Behaviours: ec_dictionary.

Authors: Eric Merritt (ericbmerritt@gmail.com).

Description

This provides an implementation of the ec_dictionary type using erlang orddicts as a base. The function documentation for ec_dictionary applies here as well. see ec_dictionary see orddict

Data Types

dictionary()

dictionary(K, V) = [{K, V}]

Function Index

add/3
from_list/1
get/2
get/3
has_key/2
has_value/2
keys/1
new/0
remove/2
size/1
to_list/1

Function Details

add/3

add(Key::ec_dictionary:key(K), Value::ec_dictionary:value(V), Object::dictionary(K, V)) -> dictionary(K, V)

from_list/1

from_list(List::[{ec_dictionary:key(K), ec_dictionary:value(V)}]) -> dictionary(K, V)

get/2

get(Key::ec_dictionary:key(K), Object::dictionary(K, V)) -> ec_dictionary:value(V)

get/3

get(Key::ec_dictionary:key(K), Default::ec_dictionary:value(V), Object::dictionary(K, V)) -> ec_dictionary:value(V)

has_key/2

has_key(Key::ec_dictionary:key(K), Object::dictionary(K, _V)) -> boolean()

has_value/2

has_value(Value::ec_dictionary:value(V), Object::dictionary(_K, V)) -> boolean()

keys/1

keys(Dict::dictionary(K, _V)) -> [ec_dictionary:key(K)]

new/0

new() -> dictionary(_K, _V)

remove/2

remove(Key::ec_dictionary:key(K), Object::dictionary(K, V)) -> dictionary(K, V)

size/1

size(Object::dictionary(_K, _V)) -> non_neg_integer()

to_list/1

to_list(Data::dictionary(K, V)) -> [{ec_dictionary:key(K), ec_dictionary:value(V)}]


Generated by EDoc, May 1 2024, 06:09:58.