If you want to extend your TreeMap with domain-specific methods I see two possible solutions.
composition
class EMCC(private val map: TreeMap[Long, HashSet[DSFrame]] = TreeMap.empty[Long, HashSet[DSFrame]]) {
def insert(key: Long, value: HashSet[DSFrame]) = new EMCC(map + (key -> value))
def foo = map.size
}
var e = new EMCC
e = e.insert(23L, HashSet.empty[DSFrame])
println(e.foo)
or implicit classes
type EMCC = TreeMap[Long, HashSet[DSFrame]]
implicit class EmccExt(map: EMCC) {
def foo = map.size
}
var e = new EMCC
e = e.insert(23L, HashSet.empty[DSFrame])
println(e.foo)