Copyright © (C) 2013 Juan Jose Comellas
Authors: Juan Jose Comellas (juanjo@comellas.org).
element_id() = atom() | binary()
key() = atom() | binary()
kvlist() = [kv()]
path() = [path_key()] | path_key()
path_key() = key() | non_neg_integer() | {key(), element_id()}
value() = term()
| delete_nth/2 | |
| delete_path/2 | |
| delete_value/2 | Deletes all entries associated with Key from
List. |
| equal/2 | Compares two lists and returns a boolean indicating whether both lists are equal. |
| get_path/2 | Performs the lookup of a Path (list of keys) over a nested
List of key/value pairs. |
| get_value/2 | Equivalent to get_value(Key, List, undefined).
|
| get_value/3 | Returns the value of a simple key/value property in List. |
| get_values/2 | Returns the list of values corresponding to the different Keys
in List. |
| match/2 | Matches a list of key-value pairs against a Pattern passed
as a key-value list where optional keys, values or key-value pairs can be
matched using the '_' atom as a wildcard. |
| member/2 | Returns true if there is an entry in List
whose key is equal to Key, otherwise false. |
| set_nth/3 | |
| set_path/3 | Assigns a Value to the element in a List of
key/value pairs corresponding to the Key that was passed. |
| set_value/3 | Adds a property to the List with the corresponding
Key and Value. |
| set_values/2 | Sets each Key in List to its corresponding
Value. |
| take_value/2 | Equivalent to take_value(Key, List, undefined).
|
| take_value/3 | Returns the value of a simple key/value property in List. |
| take_values/2 | Returns the list of values corresponding to the different Keys
in List. |
| with/2 | Return a NewList where the Key of each
element is present in the list of Keys. |
| without/2 | Return a NewList where the Key of each
element is not present in the list of Keys. |
Deletes all entries associated with Key from
List.
Compares two lists and returns a boolean indicating whether both lists are equal. Two kvlists are equal when they have the same keys with the same values, independently of the position of each key in the list.
Performs the lookup of a Path (list of keys) over a nested
List of key/value pairs. Each path_key() can
either be a name (atom() or binary()); a
positive integer (using 1-based indexing) or an element identifier
({Key, ElementId}). If no value is found corresponding
to the Path then [] is returned.
See also: set_path/3.
Equivalent to get_value(Key, List, undefined).
Returns the value of a simple key/value property in List.
If the Key is found in the list, this function returns the
corresponding Value, otherwise Default is returned.
See also: get_value/2, set_value/3.
get_values(Keys::[Key::key() | {Key::key(), Default::value()}], List::kvlist()) -> Values::[value()]
Returns the list of values corresponding to the different Keys
in List. If the entry in Keys is found in the
List, this function returns the corresponding value. If the
entry is not found and it's a {Key, Default} tuple,
Default is added to the returned list in its place and if the
entry is just a key, then undefined is added to the returned list.
See also: get_value/2, set_values/2.
Matches a list of key-value pairs against a Pattern passed
as a key-value list where optional keys, values or key-value pairs can be
matched using the '_' atom as a wildcard. It returns a boolean
value indicating that the match was successful.
The Pattern is evaluated sequentially from head to tail, but
the key-value pairs in the List need not follow the same order
that was used in the Pattern.
The wildcard atom '_' will match any expression at the nesting
level where it was added in the pattern. Some of the ways in which it can
be used are:
- To match any value for key foo, use the key-value pair {foo, '_'}.
- To match all keys with the same value, use {'_' Value}.
- To match any key-value pair use {'_' '_'}.
- To match anything (including key-value pairs) use '_'.
Returns true if there is an entry in List
whose key is equal to Key, otherwise false.
Assigns a Value to the element in a List of
key/value pairs corresponding to the Key that was passed. The
Key can be a sequence of names (atom() or
binary()); indexes (1-based) or element identifiers
({Key, ElementId}).
See also: get_path/2.
Adds a property to the List with the corresponding
Key and Value.
See also: get_value/2, get_value/3.
Sets each Key in List to its corresponding
Value.
See also: get_values/2, set_value/3.
Equivalent to take_value(Key, List, undefined).
Returns the value of a simple key/value property in List.
If the Key is found in the list, this function returns a tuple
with the corresponding Value and the List with
this entry removed, otherwise it returns a tuple with Default
and the original List is returned.
See also: get_value/2, set_value/3, take_values/2.
take_values(Keys::[Key::key() | {Key::key(), Default::value()}], List::kvlist()) -> {Values::[value()], NewList::kvlist()}
Returns the list of values corresponding to the different Keys
in List. If the entry in Keys is found in the
List, this function returns the corresponding value and removes it
from the List. If the entry is not found and it's a
{Key, Default} tuple, Default is added to the returned
list in its place and if the entry is just a Key, then
undefined is added to the returned list.
See also: get_values/2, set_values/2.
Return a NewList where the Key of each
element is present in the list of Keys.
See also: without/2.
Return a NewList where the Key of each
element is not present in the list of Keys.
See also: with/2.
Generated by EDoc