public RunList(Collection<? extends Job> jobs) { List<Iterable<R>> runLists = new ArrayList<Iterable<R>>(); for (Job j : jobs) runLists.add(j.getBuilds()); this.base = combine(runLists); }
public RunList(View view) {// this is a type unsafe operation Set<Job> jobs = new HashSet<Job>(); for (TopLevelItem item : view.getItems()) jobs.addAll(item.getAllJobs()); List<Iterable<R>> runLists = new ArrayList<Iterable<R>>(); for (Job job : jobs) { runLists.add(job.getBuilds()); } this.base = combine(runLists); }
/** * Creates a a {@link RunList} combining all the runs of the supplied jobs. * * @param jobs the supplied jobs. * @param <J> the base class of job. * @param <R> the base class of run. * @return the run list. * @since 2.37 */ public static <J extends Job<J,R>, R extends Run<J,R>> RunList<R> fromJobs(Iterable<? extends J> jobs) { List<Iterable<R>> runLists = new ArrayList<>(); for (Job j : jobs) runLists.add(j.getBuilds()); return new RunList<>(combine(runLists)); }
public RunList(Collection<? extends Job> jobs) { List<Iterable<R>> runLists = new ArrayList<Iterable<R>>(); for (Job j : jobs) runLists.add(j.getBuilds()); this.base = combine(runLists); }
public RunList(View view) {// this is a type unsafe operation Set<Job> jobs = new HashSet<Job>(); for (TopLevelItem item : view.getItems()) jobs.addAll(item.getAllJobs()); List<Iterable<R>> runLists = new ArrayList<Iterable<R>>(); for (Job job : jobs) { runLists.add(job.getBuilds()); } this.base = combine(runLists); }
/** * Creates a a {@link RunList} combining all the runs of the supplied jobs. * * @param jobs the supplied jobs. * @param <J> the base class of job. * @param <R> the base class of run. * @return the run list. * @since 2.37 */ public static <J extends Job<J,R>, R extends Run<J,R>> RunList<R> fromJobs(Iterable<? extends J> jobs) { List<Iterable<R>> runLists = new ArrayList<>(); for (Job j : jobs) runLists.add(j.getBuilds()); return new RunList<>(combine(runLists)); }