Class ImmutableNetworkConfiguration.AgentNetworkConfiguration
java.lang.Object
fr.enedis.chutney.agent.domain.configure.ImmutableNetworkConfiguration.AgentNetworkConfiguration
- All Implemented Interfaces:
NetworkConfiguration.AgentNetworkConfiguration
- Enclosing class:
ImmutableNetworkConfiguration
@Generated(from="NetworkConfiguration.AgentNetworkConfiguration",
generator="Immutables")
@Immutable
@CheckReturnValue
public static final class ImmutableNetworkConfiguration.AgentNetworkConfiguration
extends Object
implements NetworkConfiguration.AgentNetworkConfiguration
Immutable implementation of
NetworkConfiguration.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 ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeAgentNetworkConfiguration. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableSet<NamedHostAndPort> builder()Creates a builder forAgentNetworkConfiguration.Creates an immutable copy of aNetworkConfiguration.AgentNetworkConfigurationvalue.booleanThis instance is equal to all instances ofAgentNetworkConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:agentInfos.of(Iterable<? extends NamedHostAndPort> agentInfos) Construct a new immutableAgentNetworkConfigurationinstance.of(Set<NamedHostAndPort> agentInfos) Construct a new immutableAgentNetworkConfigurationinstance.toString()Prints the immutable valueAgentNetworkConfigurationwith attribute values.withAgentInfos(NamedHostAndPort... elements) Copy the current immutable object with elements that replace the content ofagentInfos.withAgentInfos(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, waitMethods inherited from interface fr.enedis.chutney.agent.domain.configure.NetworkConfiguration.AgentNetworkConfiguration
stream
-
Method Details
-
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 or
thisif not changed
-
equals
This instance is equal to all instances ofAgentNetworkConfigurationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:agentInfos. -
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
Creates a builder forAgentNetworkConfiguration.ImmutableNetworkConfiguration.AgentNetworkConfiguration.builder() .addAgentInfos|addAllAgentInfos(fr.enedis.chutney.engine.domain.delegation.NamedHostAndPort) //agentInfoselements .build();- Returns:
- A new AgentNetworkConfiguration builder
-