Class ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder
- java.lang.Object
-
- com.chutneytesting.agent.domain.configure.ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder
-
- Enclosing class:
- ImmutableNetworkConfiguration.EnvironmentConfiguration
@NotThreadSafe public static final class ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder extends Object
Builds instances of typeEnvironmentConfiguration. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder from(NetworkConfiguration.EnvironmentConfiguration instance)
Fill a builder with attribute values from the providedEnvironmentConfigurationinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addEnvironments
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder addEnvironments(EnvironmentDto element)
Adds one element toenvironmentsset.- Parameters:
element- A environments element- Returns:
thisbuilder for use in a chained invocation
-
addEnvironments
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder addEnvironments(EnvironmentDto... elements)
Adds elements toenvironmentsset.- Parameters:
elements- An array of environments elements- Returns:
thisbuilder for use in a chained invocation
-
environments
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder environments(Iterable<? extends EnvironmentDto> elements)
Sets or replaces all elements forenvironmentsset.- Parameters:
elements- An iterable of environments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllEnvironments
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder addAllEnvironments(Iterable<? extends EnvironmentDto> elements)
Adds elements toenvironmentsset.- Parameters:
elements- An iterable of environments elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableNetworkConfiguration.EnvironmentConfiguration build()
Builds a newEnvironmentConfiguration.- Returns:
- An immutable instance of EnvironmentConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-
-