@Test public void getLatestCloudbreakVersion() { List<String> list1 = generateVersionList(devVersion, unReleasedVersion); List<String> list2 = generateVersionList(releasedVersion, extendedUnreleasedVersion); versions = generateCloudBreakVersions(list1, list2); assertEquals("2.8.0-rev.82", underTest.latestCloudbreakVersion(versions)); }
public String latestCloudbreakVersion(Iterable<CloudbreakVersion> cloudbreakVersions) { SortedMap<Versioned, CloudbreakVersion> sortedCloudbreakVersions = new TreeMap<>(new VersionComparator()); for (CloudbreakVersion cbv : cloudbreakVersions) { cbv.getVersions().forEach(cbvs -> sortedCloudbreakVersions.put(() -> cbvs, cbv)); } return sortedCloudbreakVersions.lastKey().getVersion(); }
ImageCatalogVersionFilter { public String latestCloudbreakVersion(Iterable<CloudbreakVersion> cloudbreakVersions) { SortedMap<Versioned, CloudbreakVersion> sortedCloudbreakVersions = new TreeMap<>(new VersionComparator()); for (CloudbreakVersion cbv : cloudbreakVersions) { cbv.getVersions().forEach(cbvs -> sortedCloudbreakVersions.put(() -> cbvs, cbv)); } return sortedCloudbreakVersions.lastKey().getVersion(); } }
ImageCatalogVersionFilter { public String latestCloudbreakVersion(Iterable<CloudbreakVersion> cloudbreakVersions) { SortedMap<Versioned, CloudbreakVersion> sortedCloudbreakVersions = new TreeMap<>(new VersionComparator()); for (CloudbreakVersion cbv : cloudbreakVersions) { cbv.getVersions().forEach(cbvs -> sortedCloudbreakVersions.put(() -> cbvs, cbv)); } return sortedCloudbreakVersions.lastKey().getVersion(); }  }
ImageCatalogVersionFilter { public String latestCloudbreakVersion(Iterable<CloudbreakVersion> cloudbreakVersions) { SortedMap<Versioned, CloudbreakVersion> sortedCloudbreakVersions = new TreeMap<>(new VersionComparator()); for (CloudbreakVersion cbv : cloudbreakVersions) { cbv.getVersions().forEach(cbvs -> sortedCloudbreakVersions.put(() -> cbvs, cbv)); } return sortedCloudbreakVersions.lastKey().getVersion(); }  Set<CloudbreakVersion> filterReleasedVersions(Collection<CloudbreakVersion> cloudbreakVersions, String releasedVersion); Set<CloudbreakVersion> filterUnreleasedVersions(Collection<CloudbreakVersion> cloudbreakVersions, String unReleasedVersion); String latestCloudbreakVersion(Iterable<CloudbreakVersion> cloudbreakVersions); boolean isVersionUnspecified(String cbVersion); String extractUnreleasedVersion(String cbVersion); String extractReleasedVersion(String cbVersion); String extractExtendedUnreleasedVersion(String cbVersion); }
ImageCatalogVersionFilter { public String latestCloudbreakVersion(Iterable<CloudbreakVersion> cloudbreakVersions) { SortedMap<Versioned, CloudbreakVersion> sortedCloudbreakVersions = new TreeMap<>(new VersionComparator()); for (CloudbreakVersion cbv : cloudbreakVersions) { cbv.getVersions().forEach(cbvs -> sortedCloudbreakVersions.put(() -> cbvs, cbv)); } return sortedCloudbreakVersions.lastKey().getVersion(); }  Set<CloudbreakVersion> filterReleasedVersions(Collection<CloudbreakVersion> cloudbreakVersions, String releasedVersion); Set<CloudbreakVersion> filterUnreleasedVersions(Collection<CloudbreakVersion> cloudbreakVersions, String unReleasedVersion); String latestCloudbreakVersion(Iterable<CloudbreakVersion> cloudbreakVersions); boolean isVersionUnspecified(String cbVersion); String extractUnreleasedVersion(String cbVersion); String extractReleasedVersion(String cbVersion); String extractExtendedUnreleasedVersion(String cbVersion);  }