Class ImmutableNetworkConfiguration.EnvironmentConfiguration
- java.lang.Object
-
- com.chutneytesting.agent.domain.configure.ImmutableNetworkConfiguration.EnvironmentConfiguration
-
- All Implemented Interfaces:
NetworkConfiguration.EnvironmentConfiguration
- Enclosing class:
- ImmutableNetworkConfiguration
@Immutable @CheckReturnValue public static final class ImmutableNetworkConfiguration.EnvironmentConfiguration extends Object implements NetworkConfiguration.EnvironmentConfiguration
Immutable implementation ofNetworkConfiguration.EnvironmentConfiguration.Use the builder to create immutable instances:
ImmutableNetworkConfiguration.EnvironmentConfiguration.builder(). Use the static factory method to create immutable instances:ImmutableNetworkConfiguration.EnvironmentConfiguration.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableNetworkConfiguration.EnvironmentConfiguration.BuilderBuilds instances of typeEnvironmentConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableNetworkConfiguration.EnvironmentConfiguration.Builderbuilder()Creates a builder forEnvironmentConfiguration.static ImmutableNetworkConfiguration.EnvironmentConfigurationcopyOf(NetworkConfiguration.EnvironmentConfiguration instance)Creates an immutable copy of aNetworkConfiguration.EnvironmentConfigurationvalue.com.google.common.collect.ImmutableSet<EnvironmentDto>environments()booleanequals(Object another)This instance is equal to all instances ofEnvironmentConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:environments.static ImmutableNetworkConfiguration.EnvironmentConfigurationof(Iterable<? extends EnvironmentDto> environments)Construct a new immutableEnvironmentConfigurationinstance.static ImmutableNetworkConfiguration.EnvironmentConfigurationof(Set<EnvironmentDto> environments)Construct a new immutableEnvironmentConfigurationinstance.StringtoString()Prints the immutable valueEnvironmentConfigurationwith attribute values.ImmutableNetworkConfiguration.EnvironmentConfigurationwithEnvironments(EnvironmentDto... elements)Copy the current immutable object with elements that replace the content ofenvironments.ImmutableNetworkConfiguration.EnvironmentConfigurationwithEnvironments(Iterable<? extends EnvironmentDto> elements)Copy the current immutable object with elements that replace the content ofenvironments.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.chutneytesting.agent.domain.configure.NetworkConfiguration.EnvironmentConfiguration
stream
-
-
-
-
Method Detail
-
environments
public com.google.common.collect.ImmutableSet<EnvironmentDto> environments()
- Specified by:
environmentsin interfaceNetworkConfiguration.EnvironmentConfiguration- Returns:
- The value of the
environmentsattribute
-
withEnvironments
public final ImmutableNetworkConfiguration.EnvironmentConfiguration withEnvironments(EnvironmentDto... elements)
Copy the current immutable object with elements that replace the content ofenvironments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEnvironments
public final ImmutableNetworkConfiguration.EnvironmentConfiguration withEnvironments(Iterable<? extends EnvironmentDto> elements)
Copy the current immutable object with elements that replace the content ofenvironments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of environments elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofEnvironmentConfigurationthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:environments.
-
toString
public String toString()
Prints the immutable valueEnvironmentConfigurationwith attribute values.
-
of
public static ImmutableNetworkConfiguration.EnvironmentConfiguration of(Set<EnvironmentDto> environments)
Construct a new immutableEnvironmentConfigurationinstance.- Parameters:
environments- The value for theenvironmentsattribute- Returns:
- An immutable EnvironmentConfiguration instance
-
of
public static ImmutableNetworkConfiguration.EnvironmentConfiguration of(Iterable<? extends EnvironmentDto> environments)
Construct a new immutableEnvironmentConfigurationinstance.- Parameters:
environments- The value for theenvironmentsattribute- Returns:
- An immutable EnvironmentConfiguration instance
-
copyOf
public static ImmutableNetworkConfiguration.EnvironmentConfiguration copyOf(NetworkConfiguration.EnvironmentConfiguration instance)
Creates an immutable copy of aNetworkConfiguration.EnvironmentConfigurationvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable EnvironmentConfiguration instance
-
builder
public static ImmutableNetworkConfiguration.EnvironmentConfiguration.Builder builder()
Creates a builder forEnvironmentConfiguration.ImmutableNetworkConfiguration.EnvironmentConfiguration.builder() .addEnvironments|addAllEnvironments(com.chutneytesting.environment.api.dto.EnvironmentDto) //environmentselements .build();- Returns:
- A new EnvironmentConfiguration builder
-
-