Skip to content

Instantly share code, notes, and snippets.

@ch8n
Created October 12, 2020 12:47
Show Gist options
  • Save ch8n/1a542d57e8c34f9c9b9c88025743074c to your computer and use it in GitHub Desktop.
Save ch8n/1a542d57e8c34f9c9b9c88025743074c to your computer and use it in GitHub Desktop.
mutable map operations
// return old value, if updating existing entry else null
abstract fun put(key: K, value: V): V?
abstract fun putAll(from: Map<out K, V>)
abstract fun clear()
// return removed value, if not existing then null
abstract fun remove(key: K): V?
open fun remove(key: K, value: V): Boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment