Thursday, 22 August 2013

Getting sortedArray of values from a HashMultiMap

Getting sortedArray of values from a HashMultiMap

i have two hashmultimaps . how do i compare the values of the multimap for
a given key.
i thought i would generate a TreeSet from HashMultiMap something like
ts1=new TreeSet(hmap.get(key)) ts2=new TreeSet(hmap.get(key))
and then iterate over one tree set and then check if that element is there
in the other tree set.
Is there a java class that generates a sorted array given a collection?

No comments:

Post a Comment