modify

abstract fun modify(owner: SlotMapOwner?, key: Any?, index: Int, attributes: Int): Slot

The slot for key, or for index when key is null, creating one if it is not there yet.

attributes applies only to a slot this call creates. An existing slot is left alone.