• Post Reply Bookmark Topic Watch Topic
  • New Topic

get the sublist of object for particular date  RSS feed

 
Ranch Hand
Posts: 155
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am looking to get the sublist from a list of objects as per date enter. Objects that are added in the list (partyList) has the property of type Date. Below is my method, but not able to figure it out, how can i get the sublist.



Any idea how can in achieve it.
Thanks
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java8 you would do something like


And if that compiles I shall be very surprised! If you look in the Stream documentation you should find hints to get something which actually works.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through the Java® Tutorials about new date classes, and stop using Date.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!