I need to pass a TreeMap as argument to a method.
The TreeMap sorts the contents to its natural order.
Is there any workaround for not having the TreeMap sort the contents. (leave the contents as it was originally added to it)
I do not have a choice of using a Map that doesnt sort - I need a TreeMap cos thats what a method thats outside my control expects.
Is this possible? Is it possible to implement a Comparator that does not sort? :-)
Thanks in advance!
Dhanya
The TreeMap sorts the contents to its natural order.
Is there any workaround for not having the TreeMap sort the contents. (leave the contents as it was originally added to it)
I do not have a choice of using a Map that doesnt sort - I need a TreeMap cos thats what a method thats outside my control expects.
Is this possible? Is it possible to implement a Comparator that does not sort? :-)
Thanks in advance!
Dhanya