Top "Case-class" questions

Case classes are regular classes which export their constructor parameters and which provide a recursive decomposition mechanism via pattern matching.

Case Class default apply method

Assuming we have the following case class: case class CasePerson(firstName: String) And we also define a companion object for …

scala case-class
IntelliJ Scala Plugin's case class indentation is absurd

When a case class has many fields and their names are long, it is often a good idea to write …

scala intellij-idea indentation case-class
How can I create an instance of a Case Class with constructor arguments with no Parameters in Scala?

I'm making a Scala app that sets by reflection field values. This works OK. However, in order to set field …

scala reflection macros case-class scala-macros
How do I "get" a Scala case object from Java?

I created a hierarchy of case objects in Scala that looks like the following: package my.awesome.package sealed abstract …

scala case-class
What is *so* wrong with case class inheritance?

While looking for something else, quite out of mere coincidence I stumbled upon few comments about how diabolical case class …

scala inheritance case-class
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 …

scala pattern-matching traits case-class
Scala 2.10 reflection, how do I extract the field values from a case class, i.e. field list from case class

How can I extract the field values from a case class in scala using the new reflection model in scala 2.10? …

scala reflection scala-2.10 case-class
Reflection on a Scala case class

I'm trying to write a trait (in Scala 2.8) that can be mixed in to a case class, allowing its fields …

reflection scala scala-2.8 case-class
Simple Iteration over case class fields

I'm trying to write a generic method to iterate over a case class's fields : case class PriceMove(price: Double, delta: …

scala case-class
Scala wont pattern match with java.lang.String and Case Class

Hello fellow Scala Programmers I have been working with Scala for some month now, however I have a problem with …

scala types pattern-matching case-class