- interface MapView(K, V) : View!(V) ¶#
-
Maps maintain keyed elements. Any kind of Object
may serve as a key for an element.
Doug Lea
@version 0.93
For an introduction to this package see Overview .
- bool allowsKey(K key) [public] ¶#
-
Report whether the MapT COULD include k as a key
Always returns false if k is null
- bool containsKey(K key) [public] ¶#
-
Report whether there exists any element with Key key.
true if there is such an element
- bool containsPair(K key, V value) [public] ¶#
-
Report whether there exists a (key, value) pair
true if there is such an element
- PairIterator!(K, V) keys() [public] ¶#
-
Return an enumeration that may be used to traverse through
the keys (not elements) of the collection. The corresponding
elements can be looked at by using at(k) for each key k. For example:
Iterator keys = amap.keys();
while (keys.more()) {
K key = keys.get();
T value = amap.get(key)
// ...
}
the enumeration
- int opApply(int delegate (inout K key, inout V value) dg) ¶#
-
traverse the collection content. This is cheaper than using an
iterator since there is no creation cost involved.
- V get(K key) [public] ¶#
-
Return the element associated with Key key.
@param key a key
element such that contains(key, element)
NoSuchElementException if !containsKey(key)
- bool get(K key, inout V element) [public] ¶#
-
Return the element associated with Key key.
@param key a key
whether the key is contained or not
- bool keyOf(inout K key, V value) [public] ¶#
-
Return a key associated with element. There may be any
number of keys associated with any element, but this returns only
one of them (any arbitrary one), or false if no such key exists.
@param key, a place to return a located key
@param element, a value to try to find a key for.
true where value is found; false otherwise