spice.store.MapStore.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spice-core_3 Show documentation
Show all versions of spice-core_3 Show documentation
Core functionality leveraged and shared by most other sub-projects of YouI.
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