Why isn't scala.collection.mutable.TreeMap
sold and other Map
(for example, HashMap
)?(Furthermore, the immutable TreeMap
was final, and HashMap
was sold, so no modifier criteria could be found.)
I thought the reason why I use the sealed class in Scala is to combine it with the case class so that the compiler can detect pattern match leaks, but is there any other reason?
scala
I want to prevent inheritance and expansion, but I think finalizing it is not an implementation that can return a class inherited from TreeMap such as rangeImpl
.
© 2024 OneMinuteCode. All rights reserved.