AssocMap

scalus.prelude.AssocMap
See theAssocMap companion class
object AssocMap

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
AssocMap.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def empty[A, B]: AssocMap[A, B]
def fromList[A, B](lst: List[(A, B)]): AssocMap[A, B]
def singleton[A, B](key: A, value: B): AssocMap[A, B]
def union[A : Eq, B, C](lhs: AssocMap[A, B], rhs: AssocMap[A, C]): AssocMap[A, These[B, C]]

Givens

Givens

given assocMapEq[A : Eq, B : Eq]: () => AssocMap[A, B]
given assocMapToData[A : ToData, B : ToData]: ToData[AssocMap[A, B]]

Extensions

Extensions

extension [A, B](self: AssocMap[A, B])
def all(f: ((A, B)) => Boolean): Boolean
inline def isEmpty: Boolean
def keys: List[A]
inline def length: BigInt
def map[C](f: ((A, B)) => (A, C)): AssocMap[A, C]
inline def nonEmpty: Boolean
inline def size: BigInt
def values: List[B]

Deprecated extensions

extension [A, B](self: AssocMap[A, B])(implicit evidence$1: () => A)
def delete: AssocMap[A, B]
def get: Option[B]

Optionally returns the value associated with a key.

Optionally returns the value associated with a key.

Value parameters

key

the key value

Attributes

Returns

an option value containing the value associated with key in this map, or None if none exists.

def insert: AssocMap[A, B]
def lookup: Option[B]

Attributes

Deprecated
true