A shared map, this class does not use MutableMap at the moment to remain compatible between Ceylon 1.0 and 1.1.

SharedMap has very similar semantics as ConcurrentMap with the difference that any updates made to the collections returned from keySet, valueSet and entrySet methods do not change the keys and values in the underlying Map.

This is because the Map can contain mutable data such as Buffer and byte[] objects so we must copy such elements before they are returned to you. This prevents a situation where the same entry entry is being updated concurrently by more than one thread, which could lead to race conditions.

no type hierarchy

no subtypes hierarchy

Inherited Attributes
Attributes inherited from: Object
hash, string
Attributes inherited from: Correspondence<Key,Item>
keys
Attributes inherited from: Iterable<Element,Absent>
coalesced, cycled, empty, exceptLast, first, indexed, last, paired, rest, size, string
Methods
clearshared formal void clear()

Remove every entry from this map, leaving an empty map.

putshared formal Item? 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.

putIfAbsentshared formal Item? putIfAbsent(Key key, Item item)

Same operation than putIfAbsent

removeshared formal Item? 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.

removeIfEqualsshared formal Boolean removeIfEquals(Key key, Item item)

Same operation than remove

replaceIfPresentshared formal Boolean replaceIfPresent(Key key, Item oldItem, Item newItem)

Same operation than replace

Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: Category<Element>
contains, containsAny, containsEvery
Methods inherited from: Correspondence<Key,Item>
defines, definesAny, definesEvery, get, getAll
Methods inherited from: Iterable<Element,Absent>
any, by, chain, collect, count, defaultNullElements, every, filter, find, findLast, flatMap, fold, follow, getFromFirst, interpose, iterator, longerThan, map, max, partition, product, reduce, repeat, scan, select, sequence, shorterThan, skip, skipWhile, sort, spread, take, takeWhile