From ec9b05f628550d76b358dfde71d4fcfc6bdfb767 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Thu, 8 Jan 2015 17:35:45 +0100 Subject: [PATCH] Switch to case class --- .../sasc/biopet/core/config/ConfigValueIndex.scala | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/config/ConfigValueIndex.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/config/ConfigValueIndex.scala index cad8bf058..3e234cf94 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/config/ConfigValueIndex.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/config/ConfigValueIndex.scala @@ -15,15 +15,6 @@ */ package nl.lumc.sasc.biopet.core.config -class ConfigValueIndex(val module: String, val path: List[String], val key: String, val freeVar: Boolean = true) { +case class ConfigValueIndex(module: String, path: List[String], key: String, freeVar: Boolean = true) { override def toString = "Module = " + module + ", path = " + path + ", key = " + key + ", freeVar = " + freeVar -} - -object ConfigValueIndex { - private var cache: Map[(String, List[String], String), ConfigValueIndex] = Map() - - def apply(module: String, path: List[String], key: String, freeVar: Boolean = true): ConfigValueIndex = { - if (!cache.contains(module, path, key)) cache += ((module, path, key) -> new ConfigValueIndex(module, path, key, freeVar)) - return cache(module, path, key) - } } \ No newline at end of file -- GitLab