i'm using midp2.0 and i want to know if there is any possibility do sort the keys of a hashtable. i know, that in j2se exists the collection.sort() - method, but i've nothing found for midp.
thanks in advance, stefan
posted 10 years ago
It looks like there's nothing to do this directly in MIDP 2.0. Probably the easiest way to handle this is to write your own sort() implementation, and then use it to sort a Vector or array of the keys. There are many ways to implement a sort, of course - but a quick way might be to just look at the source code used by Arrays.sort(). It just calls a private mergeSort() method which is fairly simple to duplicate.