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

spice.store.MapStore.scala Maven / Gradle / Ivy

There is a newer version: 0.7.2
Show newest version
package spice.store

class MapStore(var map: Map[String, Any] = Map.empty) extends Store {
  override def get[T](key: String): Option[T] = map.get(key).asInstanceOf[Option[T]]

  override def update[T](key: String, value: T): Unit = synchronized(map += key -> value)

  override def remove(key: String): Unit = synchronized(map -= key)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy