mambo.core.AssociativeArray

Members

Functions

_anyAA
bool _anyAA(AA aa)
Undocumented in source. Be warned that the author may not have intended to support it.
_findAA
auto _findAA(AA aa)
Undocumented in source. Be warned that the author may not have intended to support it.
_mapAA
auto _mapAA(AA aa)
Undocumented in source. Be warned that the author may not have intended to support it.
equalRange
V[] equalRange(V[][K] mm, K key)

Returns the bounds of a range that includes all the elements in the container with a key that compares equal to key.

equalRange
V[] equalRange(V[K] aa, K key)

Returns the bounds of a range that includes all the elements in the container with a key that compares equal to key.

get
V get(V[K] aa, K key)

Returns the value to which the specified key is mapped, or ($D_CODE null) if this associative array contains no mapping for the key.

insert
V insert(V[K] aa, K key, V value)

Associates the specified value with the specified key in the specified associative array. If the associative array previously contained a mapping for the key, the existing value associated for the given key will be return and the associative array is unchanged. (An associative array <tt>aa</tt> is said to contain a mapping for a key <tt>k</tt> if and only if m.containsKey(k) would return <tt>true</tt>.)

insert
V insert(V[][K] mm, K key, V value)

Associates the specified value with the specified key in the specified multimap. If the multimap previously contained a mapping for the key, the existing value associated for the given key will be return and the multimap is unchanged. (An multimap <tt>mm</tt> is said to contain a mapping for a key <tt>k</tt> if and only if m.containsKey(k) would return <tt>true</tt>.)

isEmpty
bool isEmpty(V[K] aa)

Returns <tt>true</tt> if the specified associative array contains no key-value mappings.

lowerBound
V lowerBound(V[K] aa, K key)

Returns value to lower bound

put
V put(V[K] aa, K key, V value)

Associates the specified value with the specified key in the specified associative array. If the associative array previously contained a mapping for the key, the old value is replaced by the specified value. (An associative array <tt>aa</tt> is said to contain a mapping for a key <tt>k</tt> if and only if m.containsKey(k) would return <tt>true</tt>.)

remove
V remove(V[K] aa, K key)

Removes the mapping for a key from the specified associative array if it is present. More formally, if the associative array contains a mapping from key <tt>k</tt> to value <tt>v</tt> such that

(key==null ?  k==null : key.equals(k))
, that mapping is removed. (The associative array can contain at most one such mapping.)

size
int size(V[K] aa)

Returns the number of key-value mappings in the specified associative array

Structs

KeyValue
struct KeyValue(K, V)
Undocumented in source.

Meta

Authors

Jacob Carlborg

Version

Initial created: 2008