Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 69980 invoked from network); 16 Jul 2004 20:00:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Jul 2004 20:00:36 -0000 Received: (qmail 44658 invoked by uid 500); 16 Jul 2004 20:00:36 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 44218 invoked by uid 500); 16 Jul 2004 20:00:33 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 22105 invoked by uid 99); 16 Jul 2004 16:25:35 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Message-ID: <40F80170.4010508@sensorynet.co.uk> Date: Fri, 16 Jul 2004 17:25:20 +0100 From: Veronique Couderc User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Torque Subject: SortedMap in reverse order Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Do you know how to use SortedMap in a descending order? This prints the elements in ascending order: SortedMap sortedMap = new TreeMap(); sortedMap.putAll(ht); Iterator iter = sortedMap.keySet().iterator(); while (iter.hasNext()) { String key = (String)iter.next(); out.println(sortedMap.get(key)); }//end while I found this on the net but can't make it work: Creates a reversed version of this map. Must be O(n), where n is the number of elements in this collection. @return A map with the elements in reverse order. public abstract SortedMap reversed(); Many thanks vero -- Regards Veronique Couderc SensoryNet Ltd, London t. 0845 226 3012 f. 0845 226 8512 --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org