Ive come across a nice problem recently, I have a Map
LinkedHashMap<String, List<MyCustomObject>>
I need to compare this to another Map, which will be populated in the exact same method is the data in the DB is the same.
What really is happening is , that I am populating map1 at time 0, and populating map2 at time t, using the same java method(when I say this, i mean using the same DB/tables etc) So if the data on the DB side is same, then these two maps should have the same content, in the same order(hopefully!!)
Now I want to compare these two maps and if they are not equal (i.e some new data was fetched from the DB), then I want to do some action.If they are the same, I just want to leave it like that.
Can someone point me out to tutes that will help me understand how to do that??
Is serialization an answer to this??
Thanks, Neeraj