implicit final class MapOps[A, B, M[A, B] <: MapLike[A, B, M[A, B]] with Map[A, B]] extends AnyVal
- Alphabetic
- By Inheritance
- MapOps
- AnyVal
- Any
- by AnyOps
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new MapOps(value: M[A, B])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
- def +(other: String): String
- def ->[B](y: B): (MapOps[A, B, M], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
containsEntry(entry: (A, B)): Boolean
Whether the map contains the given entry.
Whether the map contains the given entry.
- entry
a tuple representing the key value pair
- returns
true
if the map contains the entry,false
otherwise
- Annotations
- @inline() @SuppressWarnings()
-
def
containsEntry(k: A, v: B): Boolean
Whether the map contains a given key value pair as an element.
Whether the map contains a given key value pair as an element.
- k
the key
- v
the value
- returns
true
if the map contains the pair key value,false
otherwise
- Annotations
- @inline()
- def ensuring(cond: (MapOps[A, B, M]) ⇒ Boolean, msg: ⇒ Any): MapOps[A, B, M]
- def ensuring(cond: (MapOps[A, B, M]) ⇒ Boolean): MapOps[A, B, M]
- def ensuring(cond: Boolean, msg: ⇒ Any): MapOps[A, B, M]
- def ensuring(cond: Boolean): MapOps[A, B, M]
-
def
existsKey(p: (A) ⇒ Boolean): Boolean
Whether a predicate holds for at least one key of the map.
Whether a predicate holds for at least one key of the map.
- p
the predicate used to test keys
- returns
true
ifp
holds for some of the keys of the map,false
otherwise
- Annotations
- @inline()
-
def
existsValue(p: (B) ⇒ Boolean): Boolean
Whether a predicate holds for at least one value of the map.
Whether a predicate holds for at least one value of the map.
- p
the predicate used to test values
- returns
true
ifp
holds for some of the values of the map,false
otherwise
- Annotations
- @inline()
-
def
filterValues(p: (B) ⇒ Boolean): M[A, B]
Filters the map by retaining only values satisfying a predicate.
Filters the map by retaining only values satisfying a predicate.
- p
the predicate used to test values
- returns
the map with only the key value pairs whose value satisfies the predicate
p
-
def
forallKey(p: (A) ⇒ Boolean): Boolean
Whether a predicate holds for all keys of the map.
Whether a predicate holds for all keys of the map.
- p
the predicate used to test keys
- returns
true
ifp
holds for all keys of the map,false
otherwise
- Annotations
- @inline()
-
def
forallValue(p: (B) ⇒ Boolean): Boolean
Whether a predicate holds for all values of the map.
Whether a predicate holds for all values of the map.
- p
the predicate used to test values
- returns
true
ifp
holds for all values of the map,false
otherwise
- Annotations
- @inline()
- def formatted(fmtstr: String): String
-
def
future: Future[MapOps[A, B, M]]
Creates an already completed
Future
containingvalue
.Creates an already completed
Future
containingvalue
.- returns
the already completed
Future
with the specified result
- Implicit
- This member is added by an implicit conversion from MapOps[A, B, M] to AnyOps[MapOps[A, B, M]] performed by method AnyOps in scail.commons.ops.
- Definition Classes
- AnyOps
- Annotations
- @inline()
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
mapKeys[C](f: (A) ⇒ C): M[C, B]
[use case]
[use case]- C
the key type of the returned map
- f
the function used to transform keys of this map
- returns
the new map resulting from applying the given function
f
to each key and collecting the results
Full Signaturedef mapKeys[C](f: (A) ⇒ C)(implicit bf: CanBuildFrom[M[A, B], (C, B), M[C, B]]): M[C, B]
-
def
option: Option[MapOps[A, B, M]]
Creates an
Option
containingvalue
.Creates an
Option
containingvalue
.- returns
Some(value)
ifvalue
is notnull
,None
otherwise
- Implicit
- This member is added by an implicit conversion from MapOps[A, B, M] to AnyOps[MapOps[A, B, M]] performed by method AnyOps in scail.commons.ops.
- Definition Classes
- AnyOps
- Annotations
- @inline()
-
def
tap(f: (MapOps[A, B, M]) ⇒ Unit): MapOps[A, B, M]
Applies side-effectul method to
value
, returningvalue
.Applies side-effectul method to
value
, returningvalue
.- f
the side-effectful method to apply to
value
- returns
value
- Implicit
- This member is added by an implicit conversion from MapOps[A, B, M] to AnyOps[MapOps[A, B, M]] performed by method AnyOps in scail.commons.ops.
- Definition Classes
- AnyOps
-
def
toString(): String
- Definition Classes
- Any
- def →[B](y: B): (MapOps[A, B, M], B)