Packages

implicit final class MapValuesWithKey[K, V] extends AnyVal

Augments scala.collection.Map with an mapValuesWithKey method that allows mapping the values while having the keys available. Similar to the corresponding RDD operation.

K

The key type of the map.

V

The value type of the map.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MapValuesWithKey
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MapValuesWithKey(map: Map[K, V])

    map

    The wrapped map.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  7. val map: Map[K, V]
  8. def mapValuesWithKey[V2](f: (K, V) ⇒ V2): Map[K, V2]

    Transforms this map by applying a function to every retrieved value.

    Transforms this map by applying a function to every retrieved value.

    f

    the function used to transform values of this map.

    returns

    a map view which maps every key of this map to f(this(key)). The resulting map wraps the original map without copying any elements.

  9. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped