Advertisement
Guest User

Untitled

a guest
Jun 26th, 2022
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. data class Character(val id: Int, val name: String, val species: String, val gender: String, val status: Status)
  2.  
  3. enum class Status { DEAD, ALIVE, UNKNOWN }
  4.  
  5. fun getAllCharacters(): List<Character> {
  6. return listOf(
  7. Character(
  8. id = 4,
  9. name = "Beth Smith",
  10. species = "Human",
  11. gender = "Female",
  12. status = Status.ALIVE
  13. ),
  14. Character(
  15. id = 706,
  16. name = "Squid Costume Morty",
  17. species = "Robot",
  18. gender = "Male",
  19. status = Status.DEAD
  20. ),
  21. Character(
  22. id = 1,
  23. name = "Rick Sanchez",
  24. species = "Human",
  25. gender = "Male",
  26. status = Status.ALIVE
  27. )
  28. )
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement