implicit final class MergeableMap[K, V] extends AnyVal
Adds a mergeWith method to Map types.
- Alphabetic
- By Inheritance
- MergeableMap
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MergeableMap(map: Map[K, V])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val map: Map[K, V]
- def mergeWith(other: Map[K, V])(reduceFn: (V, V) => V): Map[K, V]
Creates a new map containing the union of keys and merging the common values with a
reduceFnfunction.Creates a new map containing the union of keys and merging the common values with a
reduceFnfunction.- other
The other map.
- reduceFn
The function to reduce two values.
- returns
the merged map.
- def toString(): String
- Definition Classes
- Any