This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Java in General and the fly likes Compare 2  HashMap<String, ArrayList> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Compare 2  HashMap<String, ArrayList>" Watch "Compare 2  HashMap<String, ArrayList>" New topic
Author

Compare 2 HashMap<String, ArrayList>

Tim Jones
Greenhorn

Joined: Apr 06, 2008
Posts: 28
I need a method to compare two HashMap<String, ArrayList<String>>. Google Guava API has a Method but it is for single values only - http://docs.guava-libraries.googlecode.com/git-history/v9.0/javadoc/com/google/common/collect/package-frame.html. Perhaps someone already has the solution or a reference to an online resource that covers this?

Thanks
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 4094
    
  18

And how would you compare two of such maps? When are they equal? If you can describe it, you can easily compare the two by creating your own Comparator.


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compare 2 HashMap<String, ArrayList>
 
It's not a secret anymore!