Re: sort an array

2006-06-28 Thread Marc Farrow
'll need to do is create a Class with all those fields implementing > Comparable, and implement the compareTo Method. > > hope it helps > SC > > On 6/26/06, password password wrote: > > > > Hi, > > > > I have a servlet and in this servlet I have a problem when

Re: sort an array

2006-06-28 Thread password password
gt; Sérgio Costa escribió: Put them in a list and > Collections.sort() them. > > All you'll need to do is create a Class with all those fields implementing > Comparable, and implement the compareTo Method. > > hope it helps > SC > > On 6/26/06, password password w

Re: sort an array

2006-06-27 Thread Martin Gainty
and destroy the original message without making a copy. Thank you. - Original Message - From: "password password" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, June 27, 2006 12:03 PM Subject: Re: sort an array > >Yes, you need to crea

RE: sort an array

2006-06-27 Thread Gordon Smith
this helps. Cheers, Gordon Smith -Original Message- From: password password [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 10:57 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: sort an array Hi, Arrays.sort(astrName); I can not use the sort method because

Re: sort an array

2006-06-27 Thread Marc Farrow
This is just basic Java coding. Search on google for an example. I am sure there are tons out there. On 6/27/06, password password <[EMAIL PROTECTED]> wrote: >Yes, you need to create an array of a data bean/value bean/private class >(whatever buzz word you want to give) and then sort that arra

Re: sort an array

2006-06-27 Thread password password
>Yes, you need to create an array of a data bean/value bean/private class >(whatever buzz word you want to give) and then sort that array. So you >would have an array of arrays and then sort the array of arrays. Can you put an example of this (array of arrays)? How can I do the order with this

Re: sort an array

2006-06-27 Thread Marc Farrow
array. Robert S. Harper Information Access Technology, Inc. -Original Message- From: password password [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 8:57 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: sort an array Hi, Arrays.sort(astrName); I can not use th

RE: sort an array

2006-06-27 Thread Robert Harper
remove it from the other array. Robert S. Harper Information Access Technology, Inc. -Original Message- From: password password [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 8:57 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: sort an array Hi, Arrays.sort

Re: sort an array

2006-06-27 Thread johnny
omcat Users List , [EMAIL PROTECTED] cc Subject Re: sort an array Hi, Arrays.sort(astrName); I can not use the sort method because I have the arrays have an relation. I mean, the first element of astrName have relation with first element of adblBackground1, adblBackground2, a

Re: sort an array

2006-06-27 Thread password password
Hi, Arrays.sort(astrName); I can not use the sort method because I have the arrays have an relation. I mean, the first element of astrName have relation with first element of adblBackground1, adblBackground2, adblItensity1 and adblItensity2. Then I can sort each array indepe

Re: sort an array

2006-06-27 Thread Sérgio Costa
On 6/26/06, password password wrote: > > Hi, > > I have a servlet and in this servlet I have a problem when sort an > array. If in Tomcat 5.5.4 (on windows) the order is very fast (about 2 > seconds) , but in tomcat 5.5.9 is slower (about 25 seconds). I don't

Re: sort an array

2006-06-27 Thread Marc Farrow
Search on Interface of Collections (specifically the comparable method). This should allow you to write your own way to compare objects and thus the Java engine will sort based upon your comparable method. On 6/27/06, password password <[EMAIL PROTECTED]> wrote: Hi, Arrays.sort(astrName);

Re: sort an array

2006-06-27 Thread password password
Hi, Arrays.sort(astrName); I can not use the sort method because I have the arrays have an relation. I mean, the first element of astrName have relation with first element of adblBackground1, adblBackground2, adblItensity1 and adblItensity2. Then I can sort each array indepe

Re: sort an array

2006-06-27 Thread Rajeev N. Jha
: Put them in a list and Collections.sort() them. All you'll need to do is create a Class with all those fields implementing Comparable, and implement the compareTo Method. hope it helps SC On 6/26/06, password password wrote: Hi, I have a servlet and in this servlet I have a problem wh

Re: sort an array

2006-06-27 Thread Pid
able, and implement the compareTo Method. > > hope it helps > SC > > On 6/26/06, password password wrote: >> Hi, >> >> I have a servlet and in this servlet I have a problem when sort an >> array. If in Tomcat 5.5.4 (on windows) the order is very fast (about 2 >>

Re: sort an array

2006-06-27 Thread password password
nd implement the compareTo Method. hope it helps SC On 6/26/06, password password wrote: > > Hi, > > I have a servlet and in this servlet I have a problem when sort an > array. If in Tomcat 5.5.4 (on windows) the order is very fast (about 2 > seconds) , but in tomcat 5.5.9 is slower (abo

Re: sort an array

2006-06-26 Thread Sérgio Costa
s servlet I have a problem when sort an array. If in Tomcat 5.5.4 (on windows) the order is very fast (about 2 seconds) , but in tomcat 5.5.9 is slower (about 25 seconds). I don't Know why the same code has diferent time. The code is the next. The array h

sort an array

2006-06-26 Thread password password
Hi, I have a servlet and in this servlet I have a problem when sort an array. If in Tomcat 5.5.4 (on windows) the order is very fast (about 2 seconds) , but in tomcat 5.5.9 is slower (about 25 seconds). I don't Know why the same code has diferent time. The code is the next. The