/** * Copy the current immutable object by replacing the {@link CChangelogType#ticketSystems() ticketSystems} map with the specified map. * Nulls are not permitted as keys or values. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param entries The entries to be added to the ticketSystems map * @return A modified copy of {@code this} object */ public final CChangelog withTicketSystems(Map<String, ? extends URI> entries) { if (this.ticketSystems == entries) return this; Map<String, URI> newValue = createUnmodifiableMap(true, false, entries); return new CChangelog(this, this.project, this.releases, newValue); }
/** * Copy the current immutable object by replacing the {@link CChangelogType#ticketSystems() ticketSystems} map with the specified map. * Nulls are not permitted as keys or values. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param entries The entries to be added to the ticketSystems map * @return A modified copy of {@code this} object */ public final CChangelog withTicketSystems(Map<String, ? extends URI> entries) { if (this.ticketSystems == entries) return this; Map<String, URI> newValue = createUnmodifiableMap(true, false, entries); return new CChangelog(this, this.project, this.releases, newValue); }
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); }