case-class
How should I extend a case class if a derived class is meant to have the same parameter and shouldn't override?
case class Message(xml : Node) { def toXML : Node = xml } case class开发者_运维知识库 ReqValidationMessage (xml : Node) extends Message(xml){[详细]
2023-04-12 18:22 分类:问答Scala: Mix traits and case class in pattern match
I want to match on some case classes. If I don\'t know them, I want to match on a specified trait the 开发者_如何转开发classes have to extend. This looks like[详细]
2023-04-09 22:47 分类:问答Case classes, pattern matching and curried constructors in Scala
They don\'t seem to mix that well: abstract class A case class B (var a: Int)(var b: String) extends A case class C extends A[详细]
2023-04-01 15:43 分类:问答Does the order of alternatives in a Scala match expression matter in terms of performance?
In particular with respect to pattern matching and case classes. Consider the following: abstract class Expr[详细]
2023-03-28 15:03 分类:问答Difference between home made extractor and case class extractor
According to the scala specification, the extractor built by case classes is the following (scala specification §5.3.2):[详细]
2023-03-27 04:30 分类:问答Case classes and Proxy behaviour in Scala 2.9
On migrating our code to Scala 2.9 we\'ve found large swathes of it that didn\'t work and failed silently. We tracked it down to case classes that extend Proxy not being equal. In our code we don\'t e[详细]
2023-03-19 13:13 分类:问答Why does the Scala compiler say that copy is not a member of my case class?
First, this is in Scala 2.8, so it should be there! =) I\'m working on Lift\'s Javascript objects and I want to have the following:[详细]
2023-03-18 06:35 分类:问答Replacing case class inheritance with extractors preserving exhaustiveness checks in Scala
I have a simple class hierarchy that represents a graph-like structure with several distinct types of vertexes implemented using case classes:[详细]
2023-03-12 08:12 分类:问答scala lift json: pattern match on unknown data?
I have some strange json that I cannot change, and I wish to parse it using the JsonParsen in lift. A typical json is like:[详细]
2023-03-04 22:37 分类:问答How to override apply in a case class companion
So here\'s the situation.I want to define a case class like so: case class A(val s: String) and I want to define an object to ensure that when I create instances of the开发者_如何学编程 class, the[详细]
2023-03-02 00:39 分类:问答