Package io.github.ai4ci.config.setup
Class PartialWattsStrogatzConfiguration.Builder
java.lang.Object
io.github.ai4ci.config.setup.PartialWattsStrogatzConfiguration.Builder
- Enclosing class:
- PartialWattsStrogatzConfiguration
Builds instances of type
PartialWattsStrogatzConfiguration
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newPartialWattsStrogatzConfiguration
.from
(Abstraction.Named instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.mechanics.Abstraction.Named
instance.from
(Abstraction.Replica instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.mechanics.Abstraction.Replica
instance.from
(SetupConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.SetupConfiguration
instance.from
(WattsStrogatzConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.WattsStrogatzConfiguration
instance.Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.WattsStrogatzConfiguration._PartialWattsStrogatzConfiguration
instance.setInitialImports
(Integer initialImports) Initializes the value for theinitialImports
attribute.Initializes the value for thename
attribute.setNetworkConnectedness
(Integer networkConnectedness) Initializes the value for thenetworkConnectedness
attribute.setNetworkRandomness
(Double networkRandomness) Initializes the value for thenetworkRandomness
attribute.setNetworkSize
(Integer networkSize) Initializes the value for thenetworkSize
attribute.setReplicate
(Integer replicate) Initializes the value for thereplicate
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder from(WattsStrogatzConfiguration._PartialWattsStrogatzConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.WattsStrogatzConfiguration._PartialWattsStrogatzConfiguration
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder from(SetupConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.SetupConfiguration
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder from(WattsStrogatzConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.WattsStrogatzConfiguration
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder from(Abstraction.Named instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.mechanics.Abstraction.Named
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder from(Abstraction.Replica instance) Fill a builder with attribute values from the providedio.github.ai4ci.abm.mechanics.Abstraction.Replica
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setName
Initializes the value for thename
attribute.- Parameters:
name
- The value for name (can benull
)- Returns:
this
builder for use in a chained invocation
-
setReplicate
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder setReplicate(Integer replicate) Initializes the value for thereplicate
attribute.If not set, this attribute will have a default value as returned by the initializer of
replicate
.- Parameters:
replicate
- The value for replicate- Returns:
this
builder for use in a chained invocation
-
setNetworkSize
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder setNetworkSize(Integer networkSize) Initializes the value for thenetworkSize
attribute.- Parameters:
networkSize
- The value for networkSize (can benull
)- Returns:
this
builder for use in a chained invocation
-
setInitialImports
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder setInitialImports(Integer initialImports) Initializes the value for theinitialImports
attribute.- Parameters:
initialImports
- The value for initialImports (can benull
)- Returns:
this
builder for use in a chained invocation
-
setNetworkRandomness
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder setNetworkRandomness(Double networkRandomness) Initializes the value for thenetworkRandomness
attribute.- Parameters:
networkRandomness
- The value for networkRandomness (can benull
)- Returns:
this
builder for use in a chained invocation
-
setNetworkConnectedness
@CanIgnoreReturnValue public final PartialWattsStrogatzConfiguration.Builder setNetworkConnectedness(Integer networkConnectedness) Initializes the value for thenetworkConnectedness
attribute.- Parameters:
networkConnectedness
- The value for networkConnectedness (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
Builds a newPartialWattsStrogatzConfiguration
.- Returns:
- An immutable instance of WattsStrogatzConfiguration
- Throws:
IllegalStateException
- if any required attributes are missing
-