public int compare(NoteDisplay note1, NoteDisplay note2) { if (note1 == null || note2 == null) { return 0; } return note1.getProviderName().compareTo(note2.getProviderName()); }
public int compare(NoteDisplay note1, NoteDisplay note2) { if (note1 == null || note2 == null) { return 0; } if (note2.getObservationDate() == null || note1.getObservationDate() == null) { return 0; } return note2.getObservationDate().compareTo(note1.getObservationDate()); }