• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sorting a List of Value Objects  RSS feed

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

How could I sort a List of Value Objects based on the java.sql.Timestamp property of the Value Object. Say I have a VO called MyVO which in turn has a properrty myTime which is a java.sql.Timestamp. Now I have a List of these VO which I want sorted based on the myTime property. How do I acheive this?
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you supposed to write a sorting algorithm, or use an existing method? If the latter, go through the Collections class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!