Module mymaps

Thin wrapper around the maps module falling back to gb_trees if maps are not available (Erlang versions below 17.0).

Copyright © 2016 Zuse Institute Berlin

Version: $Id$

Authors: Nico Kruber (kruber@zib.de).

Description

Thin wrapper around the maps module falling back to gb_trees if maps are not available (Erlang versions below 17.0). (extend as needed)

Data Types

mymap()

mymap() = #{}

Function Index

get/2
get/3
find/2
from_list/1
is_key/2
keys/1
new/0
put/3
remove/2
to_list/1
update/3
values/1
size/1

Function Details

get/2

get(Key :: term(), Map :: mymap()) -> Value :: term()

get/3

get(Key :: term(), Map :: mymap(), Default) -> Value | Default

find/2

find(Key :: term(), Map :: mymap()) ->
        {ok, Value :: term()} | error

from_list/1

from_list(List :: [{Key :: term(), Value :: term()}]) ->
             Map :: mymap()

is_key/2

is_key(Key :: term(), Map :: mymap()) -> boolean()

keys/1

keys(Map :: mymap()) -> [Key :: term()]

new/0

new() -> mymap()

put/3

put(Key :: term(), Value :: term(), Map1 :: mymap()) ->
       Map2 :: mymap()

remove/2

remove(Key :: term(), Map1 :: mymap()) -> Map2 :: mymap()

to_list/1

to_list(Map :: mymap()) -> [{Key :: term(), Value :: term()}]

update/3

update(Key :: term(), Value :: term(), Map1 :: mymap()) ->
          Map2 :: mymap()

values/1

values(Map :: mymap()) -> [Value :: term()]

size/1

size(Map :: mymap()) -> non_neg_integer()


Generated by EDoc, Aug 2 2016, 13:43:23.