On Mar 10, 2005, at 10:36, Rikesh Balan Krishnan wrote:
But all this methods are applicable only if the model class extends the
comparator interface.
No. If your "model class" do not implement java.lang.Comparable, you
can provide your own java.util.Comparator to
java.util.Collections.sort() an
iling List
Subject: RE: Sorting of array lists
But all this methods are applicable only if the model class extends the
comparator interface.I too had a similar problem,but I was not able to
use the collection.sort because if the model class doesn't extend the
comparator interface, it will gi
e for a alofrithm where I wrote a sort method.I'm still looking
for some different method.
-Original Message-
From: Mark Benussi [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 2:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Sorting of array lists
Krishna
|
| cc:
|
| bcc:
) {
title = string;
}
}
}
-Original Message-
From: Krishna Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
Sent: 10 March 2005 08:35
To: Struts Users Mailing List
Subject: Sorting of array lists
Hi all,
I have a doubt regarding sorting in array List.
I have an array List
Use Collections.sort(list, new Comparator() {...});
or Collections.sort(list) if your Plan class implements Comparable
Nico.
Krishna Mohan Radhakrishnan a écrit :
Hi all,
I have a doubt regarding sorting in array List.
I have an array List which contains array list objects of type Plan.
The Plan o
Hi all,
I have a doubt regarding sorting in array List.
I have an array List which contains array list objects of type Plan.
The Plan object contains 3 variables : plantitle ,plandescription and
planname.
I have to sort the arraylist based on the plantitle first and then based
on the plandesc
7 matches
Mail list logo