summaryrefslogtreecommitdiffstats
path: root/bundle-plugin/src/main/scala/com/yahoo/container/plugin/util/Maps.scala
diff options
context:
space:
mode:
Diffstat (limited to 'bundle-plugin/src/main/scala/com/yahoo/container/plugin/util/Maps.scala')
-rw-r--r--bundle-plugin/src/main/scala/com/yahoo/container/plugin/util/Maps.scala19
1 files changed, 0 insertions, 19 deletions
diff --git a/bundle-plugin/src/main/scala/com/yahoo/container/plugin/util/Maps.scala b/bundle-plugin/src/main/scala/com/yahoo/container/plugin/util/Maps.scala
deleted file mode 100644
index cafc8431b0e..00000000000
--- a/bundle-plugin/src/main/scala/com/yahoo/container/plugin/util/Maps.scala
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.plugin.util
-
-import collection.mutable.MultiMap
-
-/**
- * @author tonytv
- */
-object Maps {
- def combine[K, V](map1 : Map[K, V], map2 : Map[K, V])(f : (V, V) => V) : Map[K, V] = {
- def logicError : V = throw new RuntimeException("Logic error.")
- def combineValues(key : K) = key -> f(map1.getOrElse(key, logicError), map2.getOrElse(key, logicError))
-
- val keysInBoth = map1.keySet intersect map2.keySet
- def notInBoth = !keysInBoth.contains(_ : K)
-
- map1.filterKeys(notInBoth) ++ map2.filterKeys(notInBoth) ++ keysInBoth.map(combineValues)
- }
-}