public List<Rc> sortByTitleAndFilterDoubles(List<Rc> rcList) {
    List<Rc> result = new ArrayList<Rc>();
    List<Rc> sorted = new ArrayList<Rc>();
    sorted.addAll(rcList);
    Collections.sort(sorted, new Comparator<Rc>() {
      @Override
      public int compare(Rc lRc, Rc rRc) {
        int result = lRc.getTitle().compareTo(rRc.getTitle());
        if (result == 0) {
          result = rRc.getTimestamp().compare(lRc.getTimestamp());
        }
        return result;
      }
    });
    Rc previous = null;
    for (Rc rc : sorted) {
      if (previous == null || (!rc.getTitle().equals(previous.getTitle()))) {
        result.add(rc);
      }
      previous = rc;
    }
    Collections.sort(result, new Comparator<Rc>() {
      @Override
      public int compare(Rc lRc, Rc rRc) {
        int result = rRc.getTimestamp().compare(lRc.getTimestamp());
        return result;
      }
    });
    return result;
  }
public List < Rc > sortByTitleAndFilterDoubles ( List < Rc > rcList ) { List < Rc > result = new ArrayList < Rc > ( ) ; List < Rc > sorted = new ArrayList < Rc > ( ) ; sorted . addAll ( rcList ) ; Collections . sort ( sorted , new Comparator < Rc > ( ) { @ Override public int compare ( Rc lRc , Rc rRc ) { int result = lRc . getTitle ( ) . compareTo ( rRc . getTitle ( ) ) ; if ( result == 0 ) { result = rRc . getTimestamp ( ) . compare ( lRc . getTimestamp ( ) ) ; } return result ; } } ) ; Rc previous = null ; for ( Rc rc : sorted ) { if ( previous == null || ( ! rc . getTitle ( ) . equals ( previous . getTitle ( ) ) ) ) { result . add ( rc ) ; } previous = rc ; } Collections . sort ( result , new Comparator < Rc > ( ) { @ Override public int compare ( Rc lRc , Rc rRc ) { int result = rRc . getTimestamp ( ) . compare ( lRc . getTimestamp ( ) ) ; return result ; } } ) ; return result ; }
sort the given List by title and filter double titles

@param rcList
@return