/** * Copy the current immutable object by replacing the {@link IntegrationDeploymentOverview#getStepsDone() stepsDone} 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 stepsDone map * @return A modified copy of {@code this} object */ public final ImmutableIntegrationDeploymentOverview withStepsDone(Map<String, ? extends String> entries) { if (this.stepsDone == entries) return this; Map<String, String> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableIntegrationDeploymentOverview( this, this.userId, this.currentState, this.targetState, newValue, this.statusMessage, this.id, this.version, this.createdAt, this.updatedAt)); }
this.currentState = Objects.requireNonNull(currentState, "currentState"); this.targetState = Objects.requireNonNull(targetState, "targetState"); this.stepsDone = createUnmodifiableMap(true, false, stepsDone); this.statusMessage = statusMessage.orElse(null); this.id = id.orElse(null);
private ImmutableIntegrationDeploymentOverview(ImmutableIntegrationDeploymentOverview.Builder builder) { this.userId = builder.userId; this.statusMessage = builder.statusMessage; this.id = builder.id; if (builder.currentState != null) { initShim.currentState(builder.currentState); } if (builder.targetState != null) { initShim.targetState(builder.targetState); } if (builder.stepsDoneIsSet()) { initShim.stepsDone(createUnmodifiableMap(false, false, builder.stepsDone)); } if (builder.versionIsSet()) { initShim.version(builder.version); } if (builder.createdAtIsSet()) { initShim.createdAt(builder.createdAt); } if (builder.updatedAtIsSet()) { initShim.updatedAt(builder.updatedAt); } this.currentState = initShim.getCurrentState(); this.targetState = initShim.getTargetState(); this.stepsDone = initShim.getStepsDone(); this.version = initShim.getVersion(); this.createdAt = initShim.getCreatedAt(); this.updatedAt = initShim.getUpdatedAt(); this.initShim = null; }