Guest User

Untitled

a guest
Jun 13th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. // Vals en el constructor son propiedades:
  2. // p = Person("fede","silva", 10 )
  3. // p.first
  4. case class Person( val first:String, val last:String, val age:Int )
  5.  
  6. // Como si fuera statics:
  7. // Person.key
  8. object Person extends Mapper[Person] {
  9.  
  10. def key = first
  11.  
  12. val first = "first" is { _.first } // "name" is accesor
  13. val last = "last" is { _.last }
  14. val age = "age" is { _.age }
  15.  
  16. }
Add Comment
Please, Sign In to add comment