public synchronized SortedSet<Version> getVersions(String bsn) { SortedMap<Version, Resource> versionMap = map.get(bsn); if (versionMap == null || versionMap.isEmpty()) return SortedList.empty(); return new SortedList<>(versionMap.keySet()); }
public synchronized SortedSet<Version> getVersions(String bsn) { SortedMap<Version, Resource> versionMap = map.get(bsn); if (versionMap == null || versionMap.isEmpty()) return SortedList.empty(); return new SortedList<>(versionMap.keySet()); }
public SortedList<T> subList(int fromIndex, int toIndex) { fromIndex += start; toIndex += start; if (toIndex < fromIndex) { int tmp = toIndex; toIndex = fromIndex; fromIndex = tmp; } toIndex = Math.max(0, toIndex); toIndex = Math.min(toIndex, end); fromIndex = Math.max(0, fromIndex); fromIndex = Math.min(fromIndex, end); if (fromIndex == start && toIndex == end) return this; if (toIndex == fromIndex) return (SortedList<T>) empty(); return new SortedList<T>(this, fromIndex, toIndex); }
public SortedList<T> subList(int fromIndex, int toIndex) { fromIndex += start; toIndex += start; if (toIndex < fromIndex) { int tmp = toIndex; toIndex = fromIndex; fromIndex = tmp; } toIndex = Math.max(0, toIndex); toIndex = Math.min(toIndex, end); fromIndex = Math.max(0, fromIndex); fromIndex = Math.min(fromIndex, end); if (fromIndex == start && toIndex == end) return this; if (toIndex == fromIndex) return (SortedList<T>) empty(); return new SortedList<T>(this, fromIndex, toIndex); }
public SortedList<T> subList(int fromIndex, int toIndex) { fromIndex += start; toIndex += start; if (toIndex < fromIndex) { int tmp = toIndex; toIndex = fromIndex; fromIndex = tmp; } toIndex = Math.max(0, toIndex); toIndex = Math.min(toIndex, end); fromIndex = Math.max(0, fromIndex); fromIndex = Math.min(fromIndex, end); if (fromIndex == start && toIndex == end) return this; if (toIndex == fromIndex) return (SortedList<T>) empty(); return new SortedList<T>(this, fromIndex, toIndex); }
public SortedList<T> subList(int fromIndex, int toIndex) { fromIndex += start; toIndex += start; if (toIndex < fromIndex) { int tmp = toIndex; toIndex = fromIndex; fromIndex = tmp; } toIndex = Math.max(0, toIndex); toIndex = Math.min(toIndex, end); fromIndex = Math.max(0, fromIndex); fromIndex = Math.min(fromIndex, end); if (fromIndex == start && toIndex == end) return this; if (toIndex == fromIndex) return (SortedList<T>) empty(); return new SortedList<T>(this, fromIndex, toIndex); }
public SortedList<T> subList(int fromIndex, int toIndex) { fromIndex += start; toIndex += start; if (toIndex < fromIndex) { int tmp = toIndex; toIndex = fromIndex; fromIndex = tmp; } toIndex = Math.max(0, toIndex); toIndex = Math.min(toIndex, end); fromIndex = Math.max(0, fromIndex); fromIndex = Math.min(fromIndex, end); if (fromIndex == start && toIndex == end) return this; if (toIndex == fromIndex) return (SortedList<T>) empty(); return new SortedList<T>(this, fromIndex, toIndex); }
public SortedList<T> subList(int fromIndex, int toIndex) { fromIndex += start; toIndex += start; if (toIndex < fromIndex) { int tmp = toIndex; toIndex = fromIndex; fromIndex = tmp; } toIndex = Math.max(0, toIndex); toIndex = Math.min(toIndex, end); fromIndex = Math.max(0, fromIndex); fromIndex = Math.min(fromIndex, end); if (fromIndex == start && toIndex == end) return this; if (toIndex == fromIndex) return (SortedList<T>) empty(); return new SortedList<T>(this, fromIndex, toIndex); }
public SortedSet<Version> versions(String bsn) throws Exception { File files[] = get(bsn, null); List<Version> versions = new ArrayList<Version>(); for (File f : files) { String version = f.getParentFile().getName(); version = Builder.cleanupVersion(version); Version v = new Version(version); versions.add(v); } if ( versions.isEmpty()) return SortedList.empty(); return new SortedList<Version>(versions); }
public SortedSet<Version> versions(String bsn) throws Exception { List<Version> versions = new ArrayList<Version>(); Collection<Project> projects = workspace.getAllProjects(); for (Project project : projects) { Map<String, Version> projectVersions = project.getVersions(); if (!projectVersions.containsKey(bsn)) { continue; } versions.add(projectVersions.get(bsn)); break; } if (versions.isEmpty()) return SortedList.empty(); return new SortedList<Version>(versions); }
@Override public SortedSet<Version> versions(String bsn) throws Exception { List<Version> versions = new ArrayList<>(); Collection<Project> projects = workspace.getAllProjects(); for (Project project : projects) { Map<String, Version> projectVersions = project.getVersions(); if (!projectVersions.containsKey(bsn)) { continue; } versions.add(projectVersions.get(bsn)); break; } if (versions.isEmpty()) return SortedList.empty(); return new SortedList<>(versions); }
public SortedSet<Version> versions(String bsn) throws Exception { List<Version> versions = new ArrayList<Version>(); Collection<Project> projects = workspace.getAllProjects(); for (Project project : projects) { Map<String, Version> projectVersions = project.getVersions(); if (!projectVersions.containsKey(bsn)) { continue; } versions.add(projectVersions.get(bsn)); break; } if (versions.isEmpty()) return SortedList.empty(); return new SortedList<Version>(versions); }
@Override public SortedSet<Version> versions(String bsn) throws Exception { List<Version> versions = new ArrayList<>(); Collection<Project> projects = workspace.getAllProjects(); for (Project project : projects) { Map<String, Version> projectVersions = project.getVersions(); if (!projectVersions.containsKey(bsn)) { continue; } versions.add(projectVersions.get(bsn)); break; } if (versions.isEmpty()) return SortedList.empty(); return new SortedList<>(versions); }
public SortedSet<Version> versions(String bsn) throws Exception { File files[] = get(bsn, null); List<Version> versions = new ArrayList<Version>(); for (File f : files) { String version = f.getParentFile().getName(); version = Builder.cleanupVersion(version); Version v = new Version(version); versions.add(v); } if ( versions.isEmpty()) return SortedList.empty(); return new SortedList<Version>(versions); }
public SortedSet<Version> versions(String bsn) throws Exception { File files[] = get(bsn, null); List<Version> versions = new ArrayList<Version>(); for (File f : files) { String version = f.getParentFile().getName(); version = Builder.cleanupVersion(version); Version v = new Version(version); versions.add(v); } if ( versions.isEmpty()) return SortedList.empty(); return new SortedList<Version>(versions); }
public SortedSet<Version> versions(String bsn) throws Exception { init(); File dir = new File(root, bsn); boolean latest = false; if (dir.isDirectory()) { String versions[] = dir.list(); List<Version> list = new ArrayList<Version>(); for (String v : versions) { Matcher m = REPO_FILE.matcher(v); if (m.matches()) { String version = m.group(2); if (!version.equals(Constants.VERSION_ATTR_LATEST)) list.add(new Version(version)); else latest = true; } } if (list.isEmpty() && latest) return LATEST_SET; else return new SortedList<Version>(list); } return SortedList.empty(); }
@Override public SortedSet<Version> versions(String bsn) throws Exception { File files[] = get(bsn, null); List<Version> versions = new ArrayList<>(); for (File f : files) { String version = f.getParentFile() .getName(); version = Analyzer.cleanupVersion(version); Version v = new Version(version); versions.add(v); } if (versions.isEmpty()) return SortedList.empty(); return new SortedList<>(versions); }
public SortedSet<Version> versions(String bsn) throws Exception { init(); boolean haslatest = false; File dir = new File(root, bsn); if (dir.isDirectory()) { String versions[] = dir.list(); List<Version> list = new ArrayList<Version>(); for (String v : versions) { Matcher m = REPO_FILE.matcher(v); if (m.matches()) { String version = m.group(2); if (version.equals("latest")) haslatest = true; else list.add(new Version(version)); } } if ( list.isEmpty() && haslatest) list.add( new Version(MAX_MAJOR,0,0)); return new SortedList<Version>(list); } return SortedList.empty(); }
@Override public SortedSet<Version> versions(String bsn) throws Exception { File files[] = get(bsn, null); List<Version> versions = new ArrayList<>(); for (File f : files) { String version = f.getParentFile() .getName(); version = Analyzer.cleanupVersion(version); Version v = new Version(version); versions.add(v); } if (versions.isEmpty()) return SortedList.empty(); return new SortedList<>(versions); }
public SortedSet<Version> versions(String bsn) throws Exception { List<Version> versions = new ArrayList<Version>(); Collection<Project> projects = workspace.getAllProjects(); for (Project project : projects) { for (Builder builder : project.getSubBuilders()) { if (bsn.equals(builder.getBsn())) { String v = builder.getVersion(); if (v == null) v = "0"; else if (!Verifier.isVersion(v)) continue; // skip versions.add(new Version(v)); } } } if ( versions.isEmpty()) return SortedList.empty(); return new SortedList<Version>(versions); }