protocol
nested_dictionary_protocol
ï
Nested dictionary protocol.
logtalk_load(nested_dictionaries(loader))
static
Public predicatesï
new/1
ï
Create an empty (nested) dictionary.
static
new(Dictionary)
new(--dictionary)
- one
empty/1
ï
True iff the dictionary is empty.
static
empty(Dictionary)
empty(@dictionary)
- zero_or_one
as_nested_dictionary/2
ï
Creates a (nested) dictionary term from a curly-brackted term representation.
static
as_nested_dictionary(Term,Dictionary)
as_nested_dictionary(++term,--dictionary)
- one_or_error
as_curly_bracketed/2
ï
Creates a a curly-brackted term representation from a (nested) dictionary.
static
as_curly_bracketed(Dictionary,Term)
as_curly_bracketed(+dictionary,--term)
- one_or_error
lookup_in/3
ï
Lookup a chain of keys in a nested dictionary. Unifies Value
with Dictionary
when Keys
is the empty list.
static
lookup_in(Keys,Value,Dictionary)
lookup_in(++list(ground),?term,+dictionary)
- zero_or_more
update_in/4
ï
Updates the value found by traversing through the nested keys.
static
update_in(OldDictionary,Keys,Value,NewDictionary)
update_in(+dictionary,++list(ground),++term,--dictionary)
- zero_or_one
update_in/5
ï
Updates the value found by traversing through the nested keys, only succeeding if the value found after traversal matches the old value.
static
update_in(OldDictionary,Keys,OldValue,NewValue,NewDictionary)
update_in(+dictionary,++list(ground),?term,++term,--dictionary)
- zero_or_one
insert_in/4
ï
Inserts a key-value pair into a dictionary by traversing through the nested keys. When the key already exists, the associated value is updated.
static
insert_in(OldDictionary,Keys,Value,NewDictionary)
insert_in(+dictionary,++list(ground),++term,--dictionary)
- zero_or_one
delete_in/4
ï
Deletes a matching key-value pair from a dictionary by traversing through the nested keys, returning the updated dictionary.
static
delete_in(OldDictionary,Keys,Value,NewDictionary)
delete_in(+dictionary,++list(ground),?term,--dictionary)
- zero_or_one
Protected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)