How to sort a List of objects by their date (java collections, List<Object>)

前端 未结 6 1406
迷失自我
迷失自我 2020-12-25 15:20
private List movieItems = null;
public List getMovieItems() {
    final int first = 0;
    if (movieItems == null) {
        getPagingInfo(         


        
6条回答
  •  清歌不尽
    2020-12-25 15:26

    You can use this:

    Collections.sort(list, org.joda.time.DateTimeComparator.getInstance());
    

提交回复
热议问题