Pattern matching and case classes

212 views
155 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
212
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Pattern matching and case classes

  1. 1. Functional Group Case class and Pattern Matcher
  2. 2. How work the case classes?
  3. 3. • Parameters list of case class are added as members automatically
  4. 4. • Automatically add methods for equals, hashCode and to String
  5. 5. • All attributes are passed by constructor method have public acesss
  6. 6. Pattern Matcher
  7. 7. Scala - Match
  8. 8. Match – Undefined type
  9. 9. What is the “_”?
  10. 10. Matching on type
  11. 11. Case class + Pattern Matching
  12. 12. Function without Pattern Matching
  13. 13. With Pattern Matching
  14. 14. Thanks!!

×