Class ImmutableNetworkDescription
java.lang.Object
com.chutneytesting.agent.domain.network.ImmutableNetworkDescription
- All Implemented Interfaces:
NetworkDescription
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableNetworkDescription
extends Object
implements NetworkDescription
Immutable implementation of
NetworkDescription.
Use the builder to create immutable instances:
ImmutableNetworkDescription.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableNetworkDescription. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableNetworkDescription.static ImmutableNetworkDescriptioncopyOf(NetworkDescription instance) Creates an immutable copy of aNetworkDescriptionvalue.booleanThis instance is equal to all instances ofImmutableNetworkDescriptionthat have equal attribute values.inthashCode()Computes a hash code from attributes:configuration,agentGraph,localAgent.toString()Prints the immutable valueNetworkDescriptionwith attribute values.withAgentGraph(AgentGraph value) Copy the current immutable object by setting a value for theagentGraphattribute.Copy the current immutable object by setting a value for theconfigurationattribute.withLocalAgent(Agent value) Copy the current immutable object by setting a present value for the optionallocalAgentattribute.withLocalAgent(Optional<? extends Agent> optional) Copy the current immutable object by setting an optional value for thelocalAgentattribute.
-
Method Details
-
configuration
- Specified by:
configurationin interfaceNetworkDescription- Returns:
- The value of the
configurationattribute
-
agentGraph
- Specified by:
agentGraphin interfaceNetworkDescription- Returns:
- The value of the
agentGraphattribute
-
localAgent
- Specified by:
localAgentin interfaceNetworkDescription- Returns:
- The value of the
localAgentattribute
-
withConfiguration
Copy the current immutable object by setting a value for theconfigurationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for configuration- Returns:
- A modified copy of the
thisobject
-
withAgentGraph
Copy the current immutable object by setting a value for theagentGraphattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for agentGraph- Returns:
- A modified copy of the
thisobject
-
withLocalAgent
Copy the current immutable object by setting a present value for the optionallocalAgentattribute.- Parameters:
value- The value for localAgent- Returns:
- A modified copy of
thisobject
-
withLocalAgent
Copy the current immutable object by setting an optional value for thelocalAgentattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for localAgent- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableNetworkDescriptionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:configuration,agentGraph,localAgent. -
toString
Prints the immutable valueNetworkDescriptionwith attribute values. -
copyOf
Creates an immutable copy of aNetworkDescriptionvalue. 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 NetworkDescription instance
-
builder
Creates a builder forImmutableNetworkDescription.ImmutableNetworkDescription.builder() .configuration(com.chutneytesting.agent.domain.configure.NetworkConfiguration) // requiredconfiguration.agentGraph(com.chutneytesting.agent.domain.network.AgentGraph) // requiredagentGraph.localAgent(com.chutneytesting.agent.domain.network.Agent) // optionallocalAgent.build();- Returns:
- A new ImmutableNetworkDescription builder
-