• Post Reply Bookmark Topic Watch Topic
  • New Topic

write a program to create dynamic maps.  RSS feed

 
Rd Dari
Ranch Hand
Posts: 214
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As per requirement i need a dynamic multi map in my application.

Can anybody give me some idea , how to write a method to create the dynamically map.

Thanks in advanced.
 
Paweł Baczyński
Bartender
Posts: 2075
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guava Multimap?

What are the requirements.
Please, TellTheDetails ← click.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rd Dari wrote:As per requirement i need a dynamic multi map in my application...

Well, since both Maps and Lists are "dynamic" in nature, the general definition of a "multimap" is:
Map<K, List<V>>

Other than that, it's difficult to know precisely what you want unless you TellTheDetails (←click).

Winston
 
Rd Dari
Ranch Hand
Posts: 214
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am reading the below Excel Sheet using this code , the requirement is to write it as a XML format(.xml) so how can i adjust all the subnodes as per key, value.


in first map:- field3 is the key, and field1 is the value
in second map : - as the key is field3 i need a map with the :- "field3"(key), "field1,field2,field3"(value) , i think it was not possible to set the values in map2 so to get this result i created a map2 and map3 to getting the output in map4

how can handle it as dynamic. e.g. 'Genitourinary Female' is the key in first map value is 'Physical Exam'

so using this key i need the related data from field1(Cell1) ,field2,(Cell2) and field3(Cell3)

means i need n numbers of Map.



Sorry ' if you are not able to understand my description'.





 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rd Dari wrote:how can handle it as dynamic. e.g. 'Genitourinary Female' is the key in first map value is 'Physical Exam'
so using this key i need the related data from field1(Cell1) ,field2,(Cell2) and field3(Cell3)
means i need n numbers of Map.

Sounds like you didn't read my post, and I'm afraid that your explanation is a bit confusing.

However, assuming that you may need to store many Physical exams for each 'Genitourinary Female', the definition (once again) would be:
Map<GenitourinaryFemale, List<PhysicalExam>>

Exactly what Map or List implementation you decide to use will be up to you.

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!