Vault

org.typelevel.vault.Vault
See theVault companion object
final class Vault

Vault - A persistent store for values of arbitrary types. This extends the behavior of the locker, into a Map that maps Keys to Lockers, creating a heterogenous store of values, accessible by keys. Such that the Vault has no type information, all the type information is contained in the keys.

Attributes

Companion:
object
Source:
Vault.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def ++(that: Vault): Vault

Merge Two Vaults. that is prioritized.

Merge Two Vaults. that is prioritized.

Attributes

Source:
Vault.scala
def adjust[A](k: Key[A], f: A => A): Vault

Adjust the value for a given key if it's present in the vault.

Adjust the value for a given key if it's present in the vault.

Attributes

Source:
Vault.scala
def delete[A](k: DeleteKey): Vault

Delete a key from the vault

Delete a key from the vault

Attributes

Source:
Vault.scala

Empty this Vault

Empty this Vault

Attributes

Source:
Vault.scala
def insert[A](k: InsertKey[A], a: A): Vault

Insert a value for a given key. Overwrites any previous value.

Insert a value for a given key. Overwrites any previous value.

Attributes

Source:
Vault.scala

Checks whether this Vault is empty

Checks whether this Vault is empty

Attributes

Source:
Vault.scala
def lookup[A](k: LookupKey[A]): Option[A]

Lookup the value of a key in this vault

Lookup the value of a key in this vault

Attributes

Source:
Vault.scala
def size: Int

The size of the vault

The size of the vault

Attributes

Source:
Vault.scala