/** * 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)); }
/** * 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)); }
private ImmutableActionDescriptorStep( String description, String name, Map<String, ? extends ConfigurationProperty> properties, Map<String, ? extends String> configuredProperties) { this.description = description; this.name = name; this.properties = createUnmodifiableMap(true, false, properties); this.configuredProperties = createUnmodifiableMap(true, false, configuredProperties); }
/** * 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)); }
private Object readResolve() throws ObjectStreamException { return validate(this); }
/** * This instance is equal to all instances of {@code ImmutableActionDescriptorStep} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@Nullable Object another) { if (this == another) return true; return another instanceof ImmutableActionDescriptorStep && equalTo((ImmutableActionDescriptorStep) another); }
/** * 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)); }
private ImmutableActionDescriptorStep(ImmutableActionDescriptorStep.Builder builder) { this.description = builder.description; this.name = builder.name; this.properties = createUnmodifiableMap(false, false, builder.properties); this.configuredProperties = builder.configuredPropertiesIsSet() ? createUnmodifiableMap(false, false, builder.configuredProperties) : createUnmodifiableMap(true, false, ActionDescriptor.ActionDescriptorStep.super.getConfiguredProperties()); }
/** * 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)); }
/** * 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)); }