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); }
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#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)); }