aspose file tools*
The moose likes Beginning Java and the fly likes how the key-value pair is sorted in ascending and descending order. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how the key-value pair is sorted in ascending and descending order." Watch "how the key-value pair is sorted in ascending and descending order." New topic
Author

how the key-value pair is sorted in ascending and descending order.

krishnan gowri
Greenhorn

Joined: Jun 18, 2007
Posts: 2
Hi guys,
I WAS to store my key-value pairs in a map. USING ONLY ONE BUTTON FIRST TIME I CLICK THE BUTTON MEAN THE RESULT IS IN ASCENDING ORDER AGAIN SECOND TIME I CLICK THE SAME BUTTON THE RESULE IS IN DESCENDING ORDER.

here ascending order we are use SortedMap interface class TreeMap. then descending order which class or method we use.

post answer.

thank you.
Gavin Tranter
Ranch Hand

Joined: Jan 01, 2007
Posts: 333
I would check the TreeMap API

G
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, krishnan!

The API documentation of the TreeMap class is available at http://java.sun.com/j2se/1.5.0/docs/api/java/util/TreeMap.html.

After reviewing it, as Gavin recommended, do you have any ideas for implementing the descending order functionality? If you're still totally stuck, I'm sure some friendly JavaRanchers would be glad to help nudge you further towards a solution.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how the key-value pair is sorted in ascending and descending order.
 
Similar Threads
static variables in JavaScript or equivalent ?
need help in properties file- key value pair
radio button not working properly, list is sorted for every two clicks
need to find quicksort that sorts in descending order ..ARG
question regarding iterating Property class