/** * Works like {@link #toString()} but only include the given axes. */ public String toString(Collection<Axis> subset) { if(size()==1 && subset.size()==1) return values().iterator().next(); StringBuilder buf = new StringBuilder(); for (Axis a : subset) { if(buf.length()>0) buf.append(','); buf.append(a.getName()).append('=').append(get(a)); } if(buf.length()==0) buf.append("default"); // special case to avoid 0-length name. return buf.toString(); }
/** * Works like {@link #toString()} but only include the given axes. */ public String toString(Collection<Axis> subset) { if(size()==1 && subset.size()==1) return values().iterator().next(); StringBuilder buf = new StringBuilder(); for (Axis a : subset) { if(buf.length()>0) buf.append(','); buf.append(a.getName()).append('=').append(get(a)); } if(buf.length()==0) buf.append("default"); // special case to avoid 0-length name. return buf.toString(); }
/** * Works like {@link #toString()} but only include the given axes. */ public String toString(Collection<Axis> subset) { if(size()==1 && subset.size()==1) return values().iterator().next(); StringBuilder buf = new StringBuilder(); for (Axis a : subset) { if(buf.length()>0) buf.append(','); buf.append(a.getName()).append('=').append(get(a)); } if(buf.length()==0) buf.append("default"); // special case to avoid 0-length name. return buf.toString(); }
/** * Works like {@link #toString()} but only include the given axes. */ public String toString(Collection<Axis> subset) { if(size()==1 && subset.size()==1) return values().iterator().next(); StringBuilder buf = new StringBuilder(); for (Axis a : subset) { if(buf.length()>0) buf.append(','); buf.append(a.getName()).append('=').append(get(a)); } if(buf.length()==0) buf.append("default"); // special case to avoid 0-length name. return buf.toString(); }
/** * Works like {@link #toString()} but only include the given axes. */ public String toString(Collection<Axis> subset) { if (size() == 1 && subset.size() == 1) { return values().iterator().next(); } StringBuilder buf = new StringBuilder(); for (Axis a : subset) { if (buf.length() > 0) { buf.append(','); } buf.append(a.getName()).append('=').append(get(a)); } if (buf.length() == 0) { buf.append("default"); // special case to avoid 0-length name. } return buf.toString(); }
/** * Gets the {@link Label}s where the builds will be run. * @return never null */ public @Nonnull Set<Label> getLabels() { final Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { return Collections.emptySet(); } Set<Label> r = new HashSet<Label>(); for (Combination c : axes.subList(LabelAxis.class).list()) r.add(jenkins.getLabel(Util.join(c.values(),"&&"))); return r; }
/** * Gets the {@link Label}s where the builds will be run. * @return never null */ public Set<Label> getLabels() { Set<Label> r = new HashSet<Label>(); for (Combination c : getAxes().subList(LabelAxis.class).list()) r.add(Hudson.getInstance().getLabel(Util.join(c.values(),"&&"))); return r; }
/** * Gets the {@link Label}s where the builds will be run. * @return never null */ public Set<Label> getLabels() { Set<Label> r = new HashSet<Label>(); for (Combination c : getAxes().subList(LabelAxis.class).list()) r.add(Hudson.getInstance().getLabel(Util.join(c.values(),"&&"))); return r; }
/** * Gets the {@link Label}s where the builds will be run. * * @return never null */ public Set<Label> getLabels() { Set<Label> r = new HashSet<Label>(); for (Combination c : getAxes().subList(LabelAxis.class).list()) { r.add(Hudson.getInstance().getLabel(Util.join(c.values(), "&&"))); } return r; }
/** * Gets the {@link Label}s where the builds will be run. * @return never null */ public Set<Label> getLabels() { Set<Label> r = new HashSet<Label>(); for (Combination c : getAxes().subList(LabelAxis.class).list()) r.add(Hudson.getInstance().getLabel(Util.join(c.values(),"&&"))); return r; }
@Override public Label getAssignedLabel() { // combine all the label axes by &&. String expr = Util.join(combination.values(getParent().getAxes().subList(LabelAxis.class)), "&&"); return Hudson.getInstance().getLabel(Util.fixEmpty(expr)); }
@Override public Label getAssignedLabel() { // combine all the label axes by &&. String expr = Util.join(combination.values(getParent().getAxes().subList(LabelAxis.class)), "&&"); return Hudson.getInstance().getLabel(Util.fixEmpty(expr)); }
@Override public Label getAssignedLabel() { // combine all the label axes by &&. String expr = Util.join(combination.values(getParent().getAxes().subList(LabelAxis.class)), "&&"); return Hudson.getInstance().getLabel(Util.fixEmpty(expr)); }
@Override public Label getAssignedLabel() { // combine all the label axes by &&. String expr = Util.join(combination.values(getParent().getAxes().subList(LabelAxis.class)), "&&"); return Hudson.getInstance().getLabel(Util.fixEmpty(expr)); }