/** * Sets or replaces all elements for {@link Project#getServers() servers} list. * @param elements An iterable of servers elements * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue @JsonProperty("servers") @JsonIgnore public final Project.Builder servers(Iterable<? extends Server> elements) { this.servers = ImmutableList.builder(); return addAllServers(elements); }
/** * Fill a builder with attribute values from the provided {@code Project} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * Collection elements and entries will be added, not replaced. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Project.Builder from(Project instance) { Objects.requireNonNull(instance, "instance"); name(instance.getName()); addAllSharedElements(instance.getSharedElements()); addAllUserPaths(instance.getUserPaths()); addAllServers(instance.getServers()); addAllVariables(instance.getVariables()); addAllPopulations(instance.getPopulations()); addAllScenarios(instance.getScenarios()); putAllProjectSettings(instance.getProjectSettings()); return (Project.Builder) this; }