Hi All
I have a requirement where in I have to implement multiple sorting inside a
java collection type.
Currently we have not decided on the collection type (List , HashMap etc) but we will go with the one which best assists in support for sorting.
This collection will be populated with a value objects of the same type (i.e. Deal java class).
This Deal java class has following attributes (i am not listing all just the ones used for sorting)
there is java.util.Date tdate
String state
(values could be open, current, new category enabled)
(values could be fail, close, lost category disabled)
So if its enabled it will show only open, current & new
& if its disabled only fail , close & lost
I get the state values in the collection but not the category(enabled/disabled) in the collection as its not a database field.
First of all I would like to know can I sort a java collection type based upon the value of the object the collection holds.
After this sort i would want to sort based on category which i mentioned earlier (enabled/disabled)
If yes do post your suggestions . I am using jdk1.3
Regards