Package io.github.ai4ci.config.setup
Class PartialAgeStratifiedNetworkConfiguration.Builder
java.lang.Object
io.github.ai4ci.config.setup.PartialAgeStratifiedNetworkConfiguration.Builder
- Enclosing class:
- PartialAgeStratifiedNetworkConfiguration
@NotThreadSafe
public static final class PartialAgeStratifiedNetworkConfiguration.Builder
extends Object
Builds instances of type
PartialAgeStratifiedNetworkConfiguration
.
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 newPartialAgeStratifiedNetworkConfiguration
.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
(AgeStratifiedNetworkConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.AgeStratifiedNetworkConfiguration
instance.Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.AgeStratifiedNetworkConfiguration._PartialAgeStratifiedNetworkConfiguration
instance.from
(SetupConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.SetupConfiguration
instance.setAgeDistribution
(EmpiricalDistribution ageDistribution) Initializes the value for theageDistribution
attribute.setInitialImports
(Integer initialImports) Initializes the value for theinitialImports
attribute.Initializes the value for thename
attribute.setNetworkConnectedness
(int 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.setNormalisedOddsContactFromAgeDifference
(Abstraction.SimpleFunction normalisedOddsContactFromAgeDifference) Initializes the value for thenormalisedOddsContactFromAgeDifference
attribute.setOddsContactFromAgeDifference
(Abstraction.SimpleFunction oddsContactFromAgeDifference) Initializes the value for theoddsContactFromAgeDifference
attribute.setReplicate
(Integer replicate) Initializes the value for thereplicate
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.Builder from(AgeStratifiedNetworkConfiguration._PartialAgeStratifiedNetworkConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.AgeStratifiedNetworkConfiguration._PartialAgeStratifiedNetworkConfiguration
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.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 PartialAgeStratifiedNetworkConfiguration.Builder from(AgeStratifiedNetworkConfiguration instance) Fill a builder with attribute values from the providedio.github.ai4ci.config.setup.AgeStratifiedNetworkConfiguration
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.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 PartialAgeStratifiedNetworkConfiguration.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
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.Builder setName(String name) 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 PartialAgeStratifiedNetworkConfiguration.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 PartialAgeStratifiedNetworkConfiguration.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 PartialAgeStratifiedNetworkConfiguration.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
-
setAgeDistribution
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.Builder setAgeDistribution(EmpiricalDistribution ageDistribution) Initializes the value for theageDistribution
attribute.- Parameters:
ageDistribution
- The value for ageDistribution (can benull
)- Returns:
this
builder for use in a chained invocation
-
setNetworkConnectedness
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.Builder setNetworkConnectedness(int networkConnectedness) Initializes the value for thenetworkConnectedness
attribute.- Parameters:
networkConnectedness
- The value for networkConnectedness- Returns:
this
builder for use in a chained invocation
-
setNetworkRandomness
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.Builder setNetworkRandomness(double networkRandomness) Initializes the value for thenetworkRandomness
attribute.- Parameters:
networkRandomness
- The value for networkRandomness- Returns:
this
builder for use in a chained invocation
-
setOddsContactFromAgeDifference
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.Builder setOddsContactFromAgeDifference(Abstraction.SimpleFunction oddsContactFromAgeDifference) Initializes the value for theoddsContactFromAgeDifference
attribute.- Parameters:
oddsContactFromAgeDifference
- The value for oddsContactFromAgeDifference (can benull
)- Returns:
this
builder for use in a chained invocation
-
setNormalisedOddsContactFromAgeDifference
@CanIgnoreReturnValue public final PartialAgeStratifiedNetworkConfiguration.Builder setNormalisedOddsContactFromAgeDifference(Abstraction.SimpleFunction normalisedOddsContactFromAgeDifference) Initializes the value for thenormalisedOddsContactFromAgeDifference
attribute.If not set, this attribute will have a default value as returned by the initializer of
normalisedOddsContactFromAgeDifference
.- Parameters:
normalisedOddsContactFromAgeDifference
- The value for normalisedOddsContactFromAgeDifference- Returns:
this
builder for use in a chained invocation
-
build
Builds a newPartialAgeStratifiedNetworkConfiguration
.- Returns:
- An immutable instance of AgeStratifiedNetworkConfiguration
- Throws:
IllegalStateException
- if any required attributes are missing
-