code: public static<T> Collection<T> sortByUpdateDate(Collection<T> collection)
     {
  
         List<T> list = collection instanceof List ? (List<T>) collection : new ArrayList<T>(collection); 
  
        Collections.sort(list, new UpdateDateComparator());
  
        return list;
  
     }
docs: Sort a list by a date property (Updateable)
  @param collection the collection
  @param <T> THE TYPE
  @return COLLECTION OF type stored