Class

eu.shiftforward.apso.Implicits

ApsoMap

Related Doc: package Implicits

Permalink

implicit final class ApsoMap[A, B] extends AnyVal

Implicit class that provides new methods for maps.

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

Instance Constructors

  1. new ApsoMap(map: Map[A, B])

    Permalink

    map

    the map to which the new methods are provided.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  7. val map: Map[A, B]

    Permalink

    the map to which the new methods are provided.

  8. def mapKeys[C](f: (A) ⇒ C): Map[C, B]

    Permalink

    Applies a given function to all keys of this map.

    Applies a given function to all keys of this map. In case f is not injective, the behaviour is undefined.

    f

    the function to apply to all keys of this map

    returns

    the resulting map with the keys mapped with function f.

  9. def toString(): String

    Permalink
    Definition Classes
    Any
  10. def twoWayMerge(that: Map[A, B])(f: (B, B) ⇒ B): Map[A, B]

    Permalink

    Merges a given map with this map.

    Merges a given map with this map. The map is constructed as follows:

    • Keys present in one of thw two maps are present in the merged map;
    • Keys in both maps are present in the merged map with a value given by f(thisValue, thatValue);
    that

    the map to be merged with this map

    f

    the function used to merge two values with the same key

    returns

    the merged map.

Deprecated Value Members

  1. def merge(that: Map[A, B])(f: (B, B) ⇒ B): Map[A, B]

    Permalink

    Merges a given map into this map.

    Merges a given map into this map. The map is constructed as follows:

    • Keys present in this map but not in that map are present in the merged map;
    • Keys present in both maps are present in the merged map with a value given by f(thisValue, thatValue);
    • Keys present in that map but not in this map are not present in the merged map.
    that

    the map to be merged into this map

    f

    the function used to merge two values with the same key

    returns

    the merged map.

    Annotations
    @deprecated
    Deprecated

    (Since version 2017/07/13) This will be removed in a future version

    To do

    check if this method is really useful / needed.

Inherited from AnyVal

Inherited from Any

Ungrouped