@Test public void hasUpdate_true() { assertThat(AbstractUpdateOperation.hasUpdate("20130310-02", "20130310-01")).isTrue(); assertThat(AbstractUpdateOperation.hasUpdate("20130310-01", "20130301-01")).isTrue(); assertThat(AbstractUpdateOperation.hasUpdate("20130310-02", "20120408-10")).isTrue(); }
static boolean hasUpdate(final String newer, final String older) { return VERSION_PATTERN.matcher(newer).matches() && VERSION_PATTERN.matcher(older).matches() ? newer.compareTo(older) > 0 : false; }
AbstractUpdateOperation implements UpdateOperation { static boolean hasUpdate(final String newer, final String older) { return VERSION_PATTERN.matcher(newer).matches() && VERSION_PATTERN.matcher(older).matches() ? newer.compareTo(older) > 0 : false; } }
AbstractUpdateOperation implements UpdateOperation { static boolean hasUpdate(final String newer, final String older) { return VERSION_PATTERN.matcher(newer).matches() && VERSION_PATTERN.matcher(older).matches() ? newer.compareTo(older) > 0 : false; } AbstractUpdateOperation(@Nonnull final RefreshableDataStore dataStore); }
AbstractUpdateOperation implements UpdateOperation { static boolean hasUpdate(final String newer, final String older) { return VERSION_PATTERN.matcher(newer).matches() && VERSION_PATTERN.matcher(older).matches() ? newer.compareTo(older) > 0 : false; } AbstractUpdateOperation(@Nonnull final RefreshableDataStore dataStore); @Override long getLastUpdateCheck(); @Override void run(); @Override void shutdown(); }
AbstractUpdateOperation implements UpdateOperation { static boolean hasUpdate(final String newer, final String older) { return VERSION_PATTERN.matcher(newer).matches() && VERSION_PATTERN.matcher(older).matches() ? newer.compareTo(older) > 0 : false; } AbstractUpdateOperation(@Nonnull final RefreshableDataStore dataStore); @Override long getLastUpdateCheck(); @Override void run(); @Override void shutdown();  }