Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

List to HashMap?  RSS feed

 
Gemini Moses
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a method which presently returns a List.

Now my method needs to return (account, status) instead of just account.

I am thinking I need to change the method to return hashmap instead of list.

Can anyone suggest me better solution?

Thanks!
 
Campbell Ritchie
Marshal
Posts: 55717
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a beginner's question . . .
Can you incorporate status and account into a single object?
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What sort of object is account ? Can you not add a status field to it ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!