Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Collection<Element>
Attributes inherited from: Correspondence<Key,Item>
Attributes inherited from: Iterable<Element,Absent>
Attributes inherited from: Map<Key,Item>
Methods
clearSource Codeshared formal void clear()

Remove every entry from this map, leaving an empty map with no entries.

cloneSource Codeshared formal MapMutator<Key,Item> clone()

A shallow copy of this collection, that is, a collection with identical elements which does not change if this collection changes. If this collection is immutable, it is acceptable to return a reference to this collection. If this collection is mutable, a newly instantiated collection must be returned.

Refines Map.clone ultimately refines Collection.clone
putSource Codeshared formal Anything put(Key key, Item item)

Add an entry to this map, overwriting any existing entry for the given key, and returning the previous value associated with the given key, if any, or null if no existing entry was overwritten.

putAllSource Codeshared default void putAll({<Key->Item>*} entries)

Add the given entries to this map, overwriting any existing entries with the same keys.

removeSource Codeshared formal Anything remove(Key key)

Remove the entry associated with the given key, if any, from this map, returning the value no longer associated with the given key, if any, or null if there was no entry associated with the given key.

removeAllSource Codeshared default void removeAll({Key*} keys)

Remove the entries associated with the given keys, if any, from this map.

removeEntrySource Codeshared default Boolean removeEntry(Key key, Item&Object item)

Remove the entry associated with the given key, if any, only if its item is equal to the given item. Return true if an entry was removed, or false otherwise.

Parameters:
  • item

    The item currently associated with the given key

replaceEntrySource Codeshared default Boolean replaceEntry(Key key, Item&Object item, Item newItem)

Modify the entry associated with the given key, if any, setting its item to the given newItem, only if the its item is currently equal to the given item. Return true if the item was replaced,or false otherwise.

Parameters:
  • item

    The item currently associated with the given key

  • newItem

    The new item to associate with the given key

Inherited Methods
Methods inherited from: Object
Methods inherited from: Category<Element>
Methods inherited from: Collection<Element>
Methods inherited from: Correspondence<Key,Item>
Methods inherited from: Iterable<Element,Absent>
Methods inherited from: Map<Key,Item>