Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can i initialized List<String,Map<String,String>> ?  RSS feed

 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day,

May i know what is the best way to initialized List<String,Map<String,String>> ?

my main purpose is to get a set value like

APJ, name_1-> ID_1,
EMEA, name_2->ID2

or should i used Map<String,Map<String,String>> ?

Thanks in advance !
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That totally depends on your needs. But let me ask you a question. Do you really need such a data-structure? Can't you use a class that encapsulates the structure (i.e. write your own)?
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forgot: List<String,Map<String,String>> won't compile. A List has one type argument.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!