AssocMap

scalus.cardano.onchain.plutus.prelude.AssocMap
See theAssocMap companion object
case class AssocMap[A, B](toList: List[(A, B)])

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def contains: Boolean
Extension method from AssocMap
def delete: AssocMap[A, B]
Extension method from AssocMap
def exists(f: ((A, B)) => Boolean): Boolean
Extension method from AssocMap
def filter(predicate: ((A, B)) => Boolean): AssocMap[A, B]
Extension method from AssocMap
def filterKeys(predicate: A => Boolean): AssocMap[A, B]
Extension method from AssocMap
def filterNot(predicate: ((A, B)) => Boolean): AssocMap[A, B]
Extension method from AssocMap
def find(predicate: ((A, B)) => Boolean): Option[(A, B)]
Extension method from AssocMap
def foldLeft[C](init: C)(combiner: (C, (A, B)) => C): C
Extension method from AssocMap
def foldRight[C](init: C)(combiner: ((A, B), C) => C): C
Extension method from AssocMap
def forall(f: ((A, B)) => Boolean): Boolean
Extension method from AssocMap
def get: Option[B]
Extension method from AssocMap

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.

inline def getOrFail: B
Extension method from AssocMap

Retrieves the value associated with a key, or fails with a custom message.

Retrieves the value associated with a key, or fails with a custom message.

Mirrors SortedMap.getOrFail, so a map can be switched between the two representations without rewriting its call sites.

Attributes

def insert: AssocMap[A, B]
Extension method from AssocMap
inline def isEmpty: Boolean
Extension method from AssocMap
def keys: List[A]
Extension method from AssocMap
inline def length: BigInt
Extension method from AssocMap
def mapValues[C](f: B => C): AssocMap[A, C]
Extension method from AssocMap
inline def nonEmpty: Boolean
Extension method from AssocMap
inline def singleOrFail(inline message: String): (A, B)
Extension method from AssocMap

Returns the only entry of this map, or fails with message when the map is empty or has more than one entry.

Returns the only entry of this map, or fails with message when the map is empty or has more than one entry.

Attributes

inline def size: BigInt
Extension method from AssocMap
def toPairList: PairList[A, B]
Extension method from AssocMap
def values: List[B]
Extension method from AssocMap

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product