@Test @DisplayName("is greater than a null one") void compareToNull() { final RecentPresentation presentation = new RecentPresentation("presentation1.sfx", null); assertTrue(presentation.compareTo(null) > 0); }
@Override public int compareTo(File o) { if (o != null && o instanceof RecentPresentation) { final RecentPresentation other = (RecentPresentation) o; return this.getNormalizedPath().compareTo(other.getNormalizedPath()); } return 1; }
RecentPresentation extends File implements Comparable<File> { @Override public int compareTo(File o) { if (o != null && o instanceof RecentPresentation) { final RecentPresentation other = (RecentPresentation) o; return this.getNormalizedPath().compareTo(other.getNormalizedPath()); } return 1; } }
RecentPresentation extends File implements Comparable<File> { @Override public int compareTo(File o) { if (o != null && o instanceof RecentPresentation) { final RecentPresentation other = (RecentPresentation) o; return this.getNormalizedPath().compareTo(other.getNormalizedPath()); } return 1; } RecentPresentation(final String path, final LocalDateTime openedDateTime); }
RecentPresentation extends File implements Comparable<File> { @Override public int compareTo(File o) { if (o != null && o instanceof RecentPresentation) { final RecentPresentation other = (RecentPresentation) o; return this.getNormalizedPath().compareTo(other.getNormalizedPath()); } return 1; } RecentPresentation(final String path, final LocalDateTime openedDateTime); LocalDateTime getOpenedDateTime(); void setOpenedDateTime(LocalDateTime openedDateTime); String getId(); String getNormalizedPath(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(File o); }
RecentPresentation extends File implements Comparable<File> { @Override public int compareTo(File o) { if (o != null && o instanceof RecentPresentation) { final RecentPresentation other = (RecentPresentation) o; return this.getNormalizedPath().compareTo(other.getNormalizedPath()); } return 1; } RecentPresentation(final String path, final LocalDateTime openedDateTime); LocalDateTime getOpenedDateTime(); void setOpenedDateTime(LocalDateTime openedDateTime); String getId(); String getNormalizedPath(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(File o);  }