/** * Builds a new {@link ActionDescriptor.ActionDescriptorStep ActionDescriptorStep}. * @return An immutable instance of ActionDescriptorStep * @throws java.lang.IllegalStateException if any required attributes are missing */ public ActionDescriptor.ActionDescriptorStep build() { return ImmutableActionDescriptorStep.validate(new ImmutableActionDescriptorStep(this)); }
/** * Construct a new immutable {@code ActionDescriptorStep} instance. * @param description The value for the {@code description} attribute * @param name The value for the {@code name} attribute * @param properties The value for the {@code properties} attribute * @param configuredProperties The value for the {@code configuredProperties} attribute * @return An immutable ActionDescriptorStep instance */ public static ActionDescriptor.ActionDescriptorStep of(String description, String name, Map<String, ? extends ConfigurationProperty> properties, Map<String, ? extends String> configuredProperties) { return validate(new ImmutableActionDescriptorStep(description, name, properties, configuredProperties)); }
/** * Copy the current immutable object by setting a value for the {@link ActionDescriptor.ActionDescriptorStep#getDescription() description} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for description (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableActionDescriptorStep withDescription(String value) { if (Objects.equals(this.description, value)) return this; return validate(new ImmutableActionDescriptorStep(this, value, this.name, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by setting a value for the {@link ActionDescriptor.ActionDescriptorStep#getName() name} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for name (can be {@code null}) * @return A modified copy of the {@code this} object */ public final ImmutableActionDescriptorStep withName(String value) { if (Objects.equals(this.name, value)) return this; return validate(new ImmutableActionDescriptorStep(this, this.description, value, this.properties, this.configuredProperties)); }
/** * Copy the current immutable object by replacing the {@link ActionDescriptor.ActionDescriptorStep#getConfiguredProperties() configuredProperties} 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 configuredProperties map * @return A modified copy of {@code this} object */ public final ImmutableActionDescriptorStep withConfiguredProperties(Map<String, ? extends String> entries) { if (this.configuredProperties == entries) return this; Map<String, String> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableActionDescriptorStep(this, this.description, this.name, this.properties, newValue)); }
/** * Copy the current immutable object by replacing the {@link ActionDescriptor.ActionDescriptorStep#getProperties() properties} 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 properties map * @return A modified copy of {@code this} object */ public final ImmutableActionDescriptorStep withProperties(Map<String, ? extends ConfigurationProperty> entries) { if (this.properties == entries) return this; Map<String, ConfigurationProperty> newValue = createUnmodifiableMap(true, false, entries); return validate(new ImmutableActionDescriptorStep(this, this.description, this.name, newValue, this.configuredProperties)); }