Packages

implicit final class MapOps[A, B, M[A, B] <: MapLike[A, B, M[A, B]] with Map[A, B]] extends AnyVal

Extension methods for Map[A, B].

Source
collection.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MapOps
  2. AnyVal
  3. Any
Implicitly
  1. by AnyOps
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MapOps(value: M[A, B])

Value Members

  1. 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()
  2. 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()
  3. 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 if p holds for some of the keys of the map, false otherwise

    Annotations
    @inline()
  4. 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 if p holds for some of the values of the map, false otherwise

    Annotations
    @inline()
  5. 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

  6. 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 if p holds for all keys of the map, false otherwise

    Annotations
    @inline()
  7. 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 if p holds for all values of the map, false otherwise

    Annotations
    @inline()
  8. def future: Future[MapOps[A, B, M]]

    Creates an already completed Future containing value.

    Creates an already completed Future containing value.

    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()
  9. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  10. 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 Signature

    def mapKeys[C](f: (A) ⇒ C)(implicit bf: CanBuildFrom[M[A, B], (C, B), M[C, B]]): M[C, B]

  11. def option: Option[MapOps[A, B, M]]

    Creates an Option containing value.

    Creates an Option containing value.

    returns

    Some(value) if value is not null, 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()
  12. def tap(f: (MapOps[A, B, M]) ⇒ Unit): MapOps[A, B, M]

    Applies side-effectul method to value, returning value.

    Applies side-effectul method to value, returning value.

    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