Companion

object Companion

Functions

Link copied to clipboard
fun A_MapBin.forEachInMapBin(action: (AvailObject, AvailObject) -> Unit)

Execute the given action with each key and associated value in this map bin.

Link copied to clipboard
fun A_MapBin.mapBinAtHash(key: A_BasicObject, keyHash: Int): AvailObject?

Look up the key in this map bin. If not found, answer null. Use the provided hash of the key.

Link copied to clipboard
fun A_MapBin.mapBinAtHashPutLevelCanDestroy(    key: A_BasicObject,     keyHash: Int,     value: A_BasicObject,     myLevel: Int,     canDestroy: Boolean): A_MapBin

Create a map bin like the receiver, but with the given key associated with the given value. If canDestroy is true and the receiver is mutable, the receiver may be modified, and possibly act as the return value of this method.

Link copied to clipboard
fun A_MapBin.mapBinAtHashReplacingLevelCanDestroy(    key: AvailObject,     keyHash: Int,     notFoundValue: AvailObject,     myLevel: Int,     canDestroy: Boolean,     transformer: (AvailObject, AvailObject) -> A_BasicObject): A_MapBin

Transform an element of this map bin. If there is an entry for the key, use the corresponding value as the second argument to the transformer, otherwise pass the notFoundValue. Write the result back to the bin, potentially recycling it if canDestroy is true.

Link copied to clipboard
fun A_MapBin.mapBinRemoveKeyHashCanDestroy(    key: A_BasicObject,     keyHash: Int,     canDestroy: Boolean): A_MapBin

Answer a map bin like the receiver, but with the given key excluded. If the key does not occur in the receiver, answer the same map bin, or an equivalent. If canDestroy is true and the receiver is mutable, the receiver can be modified and/or returned as the result.

Properties

Link copied to clipboard
val A_MapBin.isHashedMapBin: Boolean

Answer whether this map bin is hashed (versus linear).

Link copied to clipboard
val A_MapBin.mapBinIterator: MapDescriptor.MapIterator

Create an MapIterator that produces each Entry of the A_MapBin.

Link copied to clipboard
val A_MapBin.mapBinKeysHash: Int

Answer a combined hash of all the keys in this map bin.

Link copied to clipboard
val A_MapBin.mapBinKeyUnionKind: A_Type

Answer the union of the kinds of each key in this bin. A value's exact type is always an instance type (an enumeration type of size 1), and the value's kind is the nearest supertype of that instance type that isn't itself an enumeration type.

Link copied to clipboard
val A_MapBin.mapBinSize: Int

Answer how many key/value pairs are in this map bin.

Link copied to clipboard
val A_MapBin.mapBinValuesHash: Int

Answer a combined hash of all the values in this map bin.

Link copied to clipboard
val A_MapBin.mapBinValueUnionKind: A_Type

Answer the union of the kinds of each value in this bin. A value's exact type is always an instance type (an enumeration type of size 1), and the value's kind is the nearest supertype of that instance type that isn't itself an enumeration type.