Upload
raphael-ramos-monteiro
View
92
Download
2
Embed Size (px)
DESCRIPTION
Citation preview
Functional GroupCase class and Pattern Matcher
How work the case classes?
• Parameters list of case class are added as members automatically
• Automatically add methods for equals, hashCode and to String
• All attributes are passed by constructor method have public acesss
Pattern Matcher
Scala - Match
Match – Undefined type
What is the “_”?
Matching on type
Case class + Pattern Matching
Function without Pattern Matching
With Pattern Matching
Thanks!!