/** * Copy the current immutable object with elements that replace the content of {@link Integration#getTags() tags}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withTags(String... elements) { SortedSet<String> newValue = createUnmodifiableSortedSet(false, createSafeList(Arrays.asList(elements), false, true)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, newValue, this.name, this.resources)); }
/** * Copy the current immutable object with elements that replace the content of {@link Integration#getTags() tags}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of tags elements to set * @return A modified copy of {@code this} object */ public final ImmutableIntegration withTags(Iterable<String> elements) { if (this.tags == elements) return this; SortedSet<String> newValue = createUnmodifiableSortedSet(false, createSafeList(elements, false, true)); return validate(new ImmutableIntegration( this, this.id, this.isDeleted, this.steps, this.flows, this.connections, this.description, this.properties, this.configuredProperties, this.version, this.createdAt, this.updatedAt, newValue, this.name, this.resources)); }
this.createdAt = createdAt; this.updatedAt = updatedAt; this.tags = createUnmodifiableSortedSet(false, createSafeList(tags, false, true)); this.name = name; this.resources = createUnmodifiableList(false, createSafeList(resources, true, false));
this.description = builder.description; this.properties = createUnmodifiableMap(false, false, builder.properties); this.tags = createUnmodifiableSortedSet(false, createSafeList(builder.tags, false, false)); this.name = builder.name; if (builder.isDeletedIsSet()) {