All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dotty.tools.dotc.util.MutableMap.scala Maven / Gradle / Ivy

There is a newer version: 3.6.4-RC1-bin-20241220-0bfa1af-NIGHTLY
Show newest version
package dotty.tools
package dotc.util

/** A common class for lightweight mutable maps.
 */
abstract class MutableMap[Key, Value] extends ReadOnlyMap[Key, Value]:

  def update(k: Key, v: Value): Unit

  def remove(k: Key): Value | Null

  def -=(k: Key): this.type =
    remove(k)
    this

  /** Remove all bindings from this map.
   *  @param resetToInitial If true, set back to initial configuration, which includes
   *                        reallocating tables.
   */
  def clear(resetToInitial: Boolean = true): Unit

  def getOrElseUpdate(key: Key, value: => Value): Value




© 2015 - 2025 Weber Informatics LLC | Privacy Policy