AbstractMap

Constructors

this
this()

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Members

Functions

byKey
InputRange!K byKey()
Undocumented in source. Be warned that the author may not have intended to support it.
byValue
InputRange!V byValue()
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()

{@inheritDoc}

containsKey
bool containsKey(K key)

{@inheritDoc}

containsValue
bool containsValue(V value)

{@inheritDoc}

get
V get(K key)

{@inheritDoc}

getOrDefault
V getOrDefault(K k, V value)

Returns the value to which the specified key is mapped, or {@code defaultValue} if this map contains no mapping for the key.

isEmpty
bool isEmpty()

Returns <tt>true</tt> if this map contains no key-value mappings.

keySet
K[] keySet()

{@inheritDoc}

opApply
int opApply(int delegate(ref K, ref V) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(MapEntry!(K, V) entry) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object o)

Compares the specified object with this map for equality. Returns <tt>true</tt> if the given object is also a map and the two maps represent the same mappings. More formally, two maps <tt>m1</tt> and <tt>m2</tt> represent the same mappings if <tt>m1.entrySet().equals(m2.entrySet())</tt>. This ensures that the <tt>equals</tt> method works properly across different implementations of the <tt>Map</tt> interface.

opEquals
bool opEquals(IObject o)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
V opIndex(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
put
V put(K key, V value)

{@inheritDoc}

putAll
void putAll(Map!(K, V) m)

{@inheritDoc}

putIfAbsent
V putIfAbsent(K key, V value)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
V remove(K key)

{@inheritDoc}

remove
bool remove(K key, V value)
Undocumented in source. Be warned that the author may not have intended to support it.
replace
bool replace(K key, V oldValue, V newValue)
Undocumented in source. Be warned that the author may not have intended to support it.
replace
V replace(K key, V value)
Undocumented in source. Be warned that the author may not have intended to support it.
size
int size()

Returns the number of key-value mappings in this map.

toHash
size_t toHash()

Returns the hash code value for this map. The hash code of a map is defined to be the sum of the hash codes of each entry in the map's <tt>entrySet()</tt> view. This ensures that <tt>m1.equals(m2)</tt> implies that <tt>m1.toHash()==m2.toHash()</tt> for any two maps <tt>m1</tt> and <tt>m2</tt>, as required by the general contract of {@link Object#toHash}.

toString
string toString()

Returns a string representation of this map. The string representation consists of a list of key-value mappings in the order returned by the map's <tt>entrySet</tt> view's iterator, enclosed in braces (<tt>"{}"</tt>). Adjacent mappings are separated by the characters <tt>", "</tt> (comma and space). Each key-value mapping is rendered as the key followed by an equals sign (<tt>"="</tt>) followed by the associated value. Keys and values are converted to strings as by {@link string#valueOf(Object)}.

values
V[] values()

{@inheritDoc}

Mixins

__anonymous
mixin CloneMemberTemplate!(typeof(this))

Returns a shallow copy of this <tt>AbstractMap</tt> instance: the keys and values themselves are not cloned.

Variables

_size
int _size;

The number of key-value mappings contained in this map.

Meta