dcsimg
Sorting HashSet containing set of Objects
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Narayana_Bommireddipally
Posted On:   Friday, December 14, 2001 11:24 AM

I get a HashSet containing number of Objects.
How can I sort them in an order?
Each Object contains minimum 2 distinct fields.
1.Long ID and
2.String code.

Re: Sorting HashSet containing set of Objects

Posted By:   Bozidar_Dangubic  
Posted On:   Friday, December 14, 2001 12:16 PM

use TreeSet class. it automatically sorts in the objects natural order and has a constructor that takes a collection object.
About | Sitemap | Contact