title: Generic comparator to sort Java Collections (List, Set)
body: <p>I need some generic comparator which would accept instances of List or Set as an argument, and order direction argument (ASC, DESC), and then return the sorted collection. I can not seem to find on internet this example, and am in a horrible rush. I know I dont ask question in appropriate way, since I dont have any code to begin with but am in a horrible rush. Collections will contain objects which implement comparable and dates.</p>
  
  <p>Any examples, implementations very much appreciated.
  Thank you.</p>