Class ImmutableNetworkConfiguration.AgentNetworkConfiguration
- java.lang.Object
-
- com.chutneytesting.agent.domain.configure.ImmutableNetworkConfiguration.AgentNetworkConfiguration
-
- All Implemented Interfaces:
NetworkConfiguration.AgentNetworkConfiguration
- Enclosing class:
- ImmutableNetworkConfiguration
@Immutable @CheckReturnValue public static final class ImmutableNetworkConfiguration.AgentNetworkConfiguration extends Object implements NetworkConfiguration.AgentNetworkConfiguration
Immutable implementation ofNetworkConfiguration.AgentNetworkConfiguration.Use the builder to create immutable instances:
ImmutableNetworkConfiguration.AgentNetworkConfiguration.builder(). Use the static factory method to create immutable instances:ImmutableNetworkConfiguration.AgentNetworkConfiguration.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableNetworkConfiguration.AgentNetworkConfiguration.BuilderBuilds instances of typeAgentNetworkConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableSet<NamedHostAndPort>agentInfos()static ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builderbuilder()Creates a builder forAgentNetworkConfiguration.static ImmutableNetworkConfiguration.AgentNetworkConfigurationcopyOf(NetworkConfiguration.AgentNetworkConfiguration instance)Creates an immutable copy of aNetworkConfiguration.AgentNetworkConfigurationvalue.booleanequals(Object another)This instance is equal to all instances ofAgentNetworkConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:agentInfos.static ImmutableNetworkConfiguration.AgentNetworkConfigurationof(Iterable<? extends NamedHostAndPort> agentInfos)Construct a new immutableAgentNetworkConfigurationinstance.static ImmutableNetworkConfiguration.AgentNetworkConfigurationof(Set<NamedHostAndPort> agentInfos)Construct a new immutableAgentNetworkConfigurationinstance.StringtoString()Prints the immutable valueAgentNetworkConfigurationwith attribute values.ImmutableNetworkConfiguration.AgentNetworkConfigurationwithAgentInfos(NamedHostAndPort... elements)Copy the current immutable object with elements that replace the content ofagentInfos.ImmutableNetworkConfiguration.AgentNetworkConfigurationwithAgentInfos(Iterable<? extends NamedHostAndPort> elements)Copy the current immutable object with elements that replace the content ofagentInfos.-
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.AgentNetworkConfiguration
stream
-
-
-
-
Method Detail
-
agentInfos
public com.google.common.collect.ImmutableSet<NamedHostAndPort> agentInfos()
- Specified by:
agentInfosin interfaceNetworkConfiguration.AgentNetworkConfiguration- Returns:
- The value of the
agentInfosattribute
-
withAgentInfos
public final ImmutableNetworkConfiguration.AgentNetworkConfiguration withAgentInfos(NamedHostAndPort... elements)
Copy the current immutable object with elements that replace the content ofagentInfos.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAgentInfos
public final ImmutableNetworkConfiguration.AgentNetworkConfiguration withAgentInfos(Iterable<? extends NamedHostAndPort> elements)
Copy the current immutable object with elements that replace the content ofagentInfos. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of agentInfos elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofAgentNetworkConfigurationthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:agentInfos.
-
toString
public String toString()
Prints the immutable valueAgentNetworkConfigurationwith attribute values.
-
of
public static ImmutableNetworkConfiguration.AgentNetworkConfiguration of(Set<NamedHostAndPort> agentInfos)
Construct a new immutableAgentNetworkConfigurationinstance.- Parameters:
agentInfos- The value for theagentInfosattribute- Returns:
- An immutable AgentNetworkConfiguration instance
-
of
public static ImmutableNetworkConfiguration.AgentNetworkConfiguration of(Iterable<? extends NamedHostAndPort> agentInfos)
Construct a new immutableAgentNetworkConfigurationinstance.- Parameters:
agentInfos- The value for theagentInfosattribute- Returns:
- An immutable AgentNetworkConfiguration instance
-
copyOf
public static ImmutableNetworkConfiguration.AgentNetworkConfiguration copyOf(NetworkConfiguration.AgentNetworkConfiguration instance)
Creates an immutable copy of aNetworkConfiguration.AgentNetworkConfigurationvalue. 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 AgentNetworkConfiguration instance
-
builder
public static ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder builder()
Creates a builder forAgentNetworkConfiguration.ImmutableNetworkConfiguration.AgentNetworkConfiguration.builder() .addAgentInfos|addAllAgentInfos(com.chutneytesting.engine.domain.delegation.NamedHostAndPort) //agentInfoselements .build();- Returns:
- A new AgentNetworkConfiguration builder
-
-