Companion

object Companion

Properties

Link copied to clipboard

Answer the set of keys in this map. Since keys of maps and set elements cannot have duplicates, it follows that the size of the resulting set is the same as the size of this map.

Link copied to clipboard

Answer a suitable Iterable for iterating over this map's key/value pairs (made available in an Entry). This allows the Java (and Kotlin) for-each syntax hack to be used.

Link copied to clipboard

Answer the number of key/value pairs in the map.

Link copied to clipboard

Answer a tuple of values from this map in arbitrary order. A tuple is used instead of a set, since the values are not necessarily unique. The order of elements in the tuple is arbitrary and meaningless.

Functions

Link copied to clipboard

Execute the given action with each key and value.

Link copied to clipboard

Answer whether the argument is one of the keys of this map.

Link copied to clipboard

Find the key/value pair in this map which has the specified key and answer the value. Fail if the specified key is not present in the map. The result is not forced to be immutable, as it's up to the caller whether the new reference would leak beyond a usage that conserves its reference count.

Link copied to clipboard

Find the key/value pair in this map which has the specified key and answer the value. Answer null if the specified key is not present in the map. The result is not forced to be immutable, as it's up to the caller whether the new reference would leak beyond a usage that conserves its reference count.

Link copied to clipboard
fun A_Map.mapAtPuttingCanDestroy(keyObject: A_BasicObject, newValueObject: A_BasicObject, canDestroy: Boolean): A_Map

Create a new map like this map, but with a new key/value pair as specified. If there was an existing key/oldValue pair, then it is replaced by the new key/value pair. The original map can be modified in place (and then returned) if canDestroy is true and the map is mutable.

Link copied to clipboard

Given an A_Map, self, produce a similar map, but with key mapped to value. The original may be destroyed or recycled if it's mutable.

Link copied to clipboard
fun A_Map.mapAtReplacingCanDestroy(key: A_BasicObject, notFoundValue: A_BasicObject = nil, canDestroy: Boolean, transformer: (AvailObject, AvailObject) -> A_BasicObject): A_Map

Look up the key in the map. If present, use the key and the looked up value as arguments to a call to the transformer. Otherwise, use the key and the notFoundValue (nil is default for this) as arguments to the transformer. Store the transformer's result in the map under the key, destroying the original if canDestroy is true. Answer the resulting map.

Link copied to clipboard

Create a new map like this map, but without the key/value pair having the specified key. If the key was not present, then answer the original map. The original map can be modified in place (and then returned) if canDestroy is true and the map is mutable.