Unfiltered ã使ãã¨ãã«å¿ è¦ã«ãªãã®ã§ããããã¢ä¾¿å©ã§ã ã¡ãã£ã¨ãã¹ããã¼ã¿ãå®ç¾©ãã¾ããã case class Person(name: String, age: Int, height: Int) val tanaka = Person("tanaka", 16, 170) ç°ä¸åã¯16æã§170cmã§ãã ç°ä¸å㯠case class ã¨ãã¦å®ç¾©ãã¾ããã case class ãªã®ã§ãã¿ããªå¤§å¥½ããã¿ã¼ã³ãããã§å解ãã¦ãã£ã¼ã«ããåãåºããã¨ãã§ãã¾ãã tanaka match { case Person(name, _, _) => println(name) } æ®éã§ããã ã§ãå®ã¯ãããªãã¨ãã§ãã¾ãã tanaka match { case name Person (_, _) => println(name) } ãªã«ããªãã ãããããªãããããã¾ã
{{#tags}}- {{label}}
{{/tags}}