Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The method sort(List<T>, Comparator<? super T>) in the type Collections is not applicable for the arguments (List<InterfaceMessage>, Folder.CustomComparator)
- @Override
- public void sortByDate(boolean ascending) {
- Collections.sort(messageList, new CustomComparator());
- }
- class CustomComparator implements Comparator<Message> {
- public int compare(Message message1, Message message2) {
- return message1.getDate().compareTo(message2.getDate());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement