Module ec_assoc_list

provides an implementation of ec_dictionary using an association list as a basy see ec_dictionary.

Copyright © 2011 Erlware, LLC.

Behaviours: ec_dictionary.

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

Description

provides an implementation of ec_dictionary using an association list as a basy see ec_dictionary

Data Types

dictionary()

dictionary(K, V) = {ec_assoc_list, [{ec_dictionary:key(K), ec_dictionary:value(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(X1::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(X1::dictionary(K, V)) -> [{ec_dictionary:key(K), ec_dictionary:value(V)}]


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