/** * Copy the current immutable object with elements that replace the content of {@link CChangelogType#releases() releases}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final CChangelog withReleases(CRelease... elements) { List<CRelease> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return new CChangelog(this, this.project, newValue, this.ticketSystems); }
/** * Copy the current immutable object with elements that replace the content of {@link CChangelogType#releases() releases}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final CChangelog withReleases(CRelease... elements) { List<CRelease> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return new CChangelog(this, this.project, newValue, this.ticketSystems); }
private CChangelog( String project, Iterable<? extends CRelease> releases, Map<String, ? extends URI> ticketSystems) { this.project = Objects.requireNonNull(project, "project"); this.releases = createUnmodifiableList(false, createSafeList(releases, true, false)); this.ticketSystems = createUnmodifiableMap(true, false, ticketSystems); }
private CChangelog( String project, Iterable<? extends CRelease> releases, Map<String, ? extends URI> ticketSystems) { this.project = Objects.requireNonNull(project, "project"); this.releases = createUnmodifiableList(false, createSafeList(releases, true, false)); this.ticketSystems = createUnmodifiableMap(true, false, ticketSystems); }
/** * Copy the current immutable object with elements that replace the content of {@link CChangelogType#releases() releases}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of releases elements to set * @return A modified copy of {@code this} object */ public final CChangelog withReleases(Iterable<? extends CRelease> elements) { if (this.releases == elements) return this; List<CRelease> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return new CChangelog(this, this.project, newValue, this.ticketSystems); }
/** * Copy the current immutable object with elements that replace the content of {@link CChangelogType#releases() releases}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of releases elements to set * @return A modified copy of {@code this} object */ public final CChangelog withReleases(Iterable<? extends CRelease> elements) { if (this.releases == elements) return this; List<CRelease> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return new CChangelog(this, this.project, newValue, this.ticketSystems); }