Package io.github.ai4ci.config.setup
Class ImmutableAgeStratifiedNetworkConfiguration
java.lang.Object
io.github.ai4ci.config.setup.ImmutableAgeStratifiedNetworkConfiguration
- All Implemented Interfaces:
Abstraction.Named
,Abstraction.Replica
,AgeStratifiedNetworkConfiguration
,SetupConfiguration
,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableAgeStratifiedNetworkConfiguration
extends Object
implements AgeStratifiedNetworkConfiguration
Immutable implementation of
AgeStratifiedNetworkConfiguration
.
Use the builder to create immutable instances:
ImmutableAgeStratifiedNetworkConfiguration.builder()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableAgeStratifiedNetworkConfiguration
.Nested classes/interfaces inherited from interface io.github.ai4ci.config.setup.AgeStratifiedNetworkConfiguration
AgeStratifiedNetworkConfiguration._PartialAgeStratifiedNetworkConfiguration
-
Field Summary
Fields inherited from interface io.github.ai4ci.config.setup.AgeStratifiedNetworkConfiguration
DEFAULT
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableAgeStratifiedNetworkConfiguration
.copyOf
(AgeStratifiedNetworkConfiguration instance) Creates an immutable copy of aAgeStratifiedNetworkConfiguration
value.boolean
This instance is equal to all instances ofImmutableAgeStratifiedNetworkConfiguration
that have equal attribute values.getName()
int
double
int
hashCode()
Computes a hash code from attributes:name
,replicate
,networkSize
,initialImports
,ageDistribution
,networkConnectedness
,networkRandomness
,oddsContactFromAgeDifference
,normalisedOddsContactFromAgeDifference
.Creates a builder forImmutableAgeStratifiedNetworkConfiguration
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueAgeStratifiedNetworkConfiguration
with attribute values.Copy the current immutable object by setting a value for theageDistribution
attribute.withInitialImports
(Integer value) Copy the current immutable object by setting a value for theinitialImports
attribute.Copy the current immutable object by setting a value for thename
attribute.withNetworkConnectedness
(int value) Copy the current immutable object by setting a value for thenetworkConnectedness
attribute.withNetworkRandomness
(double value) Copy the current immutable object by setting a value for thenetworkRandomness
attribute.withNetworkSize
(Integer value) Copy the current immutable object by setting a value for thenetworkSize
attribute.Copy the current immutable object by setting a value for thenormalisedOddsContactFromAgeDifference
attribute.Copy the current immutable object by setting a value for theoddsContactFromAgeDifference
attribute.withReplicate
(Integer value) Copy the current immutable object by setting a value for thereplicate
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.config.setup.AgeStratifiedNetworkConfiguration
adjustedProbabilityContact
Methods inherited from interface io.github.ai4ci.config.setup.SetupConfiguration
getHilbertCoords
-
Method Details
-
getName
- Specified by:
getName
in interfaceAbstraction.Named
- Returns:
- The value of the
name
attribute
-
getReplicate
- Specified by:
getReplicate
in interfaceAbstraction.Replica
- Returns:
- The value of the
replicate
attribute
-
getNetworkSize
- Specified by:
getNetworkSize
in interfaceSetupConfiguration
- Returns:
- The value of the
networkSize
attribute
-
getInitialImports
- Specified by:
getInitialImports
in interfaceSetupConfiguration
- Returns:
- The value of the
initialImports
attribute
-
getAgeDistribution
- Specified by:
getAgeDistribution
in interfaceAgeStratifiedNetworkConfiguration
- Returns:
- The value of the
ageDistribution
attribute
-
getNetworkConnectedness
public int getNetworkConnectedness()- Specified by:
getNetworkConnectedness
in interfaceAgeStratifiedNetworkConfiguration
- Returns:
- The value of the
networkConnectedness
attribute
-
getNetworkRandomness
public double getNetworkRandomness()- Specified by:
getNetworkRandomness
in interfaceAgeStratifiedNetworkConfiguration
- Returns:
- The value of the
networkRandomness
attribute
-
getOddsContactFromAgeDifference
- Specified by:
getOddsContactFromAgeDifference
in interfaceAgeStratifiedNetworkConfiguration
- Returns:
- The value of the
oddsContactFromAgeDifference
attribute
-
getNormalisedOddsContactFromAgeDifference
- Specified by:
getNormalisedOddsContactFromAgeDifference
in interfaceAgeStratifiedNetworkConfiguration
- Returns:
- The value of the
normalisedOddsContactFromAgeDifference
attribute
-
withName
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Specified by:
withName
in interfaceSetupConfiguration
- Parameters:
value
- A new value for name- Returns:
- A modified copy of the
this
object
-
withReplicate
Copy the current immutable object by setting a value for thereplicate
attribute. An equals check used to prevent copying of the same value by returningthis
.- Specified by:
withReplicate
in interfaceSetupConfiguration
- Parameters:
value
- A new value for replicate- Returns:
- A modified copy of the
this
object
-
withNetworkSize
Copy the current immutable object by setting a value for thenetworkSize
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for networkSize- Returns:
- A modified copy of the
this
object
-
withInitialImports
Copy the current immutable object by setting a value for theinitialImports
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for initialImports- Returns:
- A modified copy of the
this
object
-
withAgeDistribution
public final ImmutableAgeStratifiedNetworkConfiguration withAgeDistribution(EmpiricalDistribution value) Copy the current immutable object by setting a value for theageDistribution
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for ageDistribution- Returns:
- A modified copy of the
this
object
-
withNetworkConnectedness
Copy the current immutable object by setting a value for thenetworkConnectedness
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for networkConnectedness- Returns:
- A modified copy of the
this
object
-
withNetworkRandomness
Copy the current immutable object by setting a value for thenetworkRandomness
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for networkRandomness- Returns:
- A modified copy of the
this
object
-
withOddsContactFromAgeDifference
public final ImmutableAgeStratifiedNetworkConfiguration withOddsContactFromAgeDifference(Abstraction.SimpleFunction value) Copy the current immutable object by setting a value for theoddsContactFromAgeDifference
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for oddsContactFromAgeDifference- Returns:
- A modified copy of the
this
object
-
withNormalisedOddsContactFromAgeDifference
public final ImmutableAgeStratifiedNetworkConfiguration withNormalisedOddsContactFromAgeDifference(Abstraction.SimpleFunction value) Copy the current immutable object by setting a value for thenormalisedOddsContactFromAgeDifference
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for normalisedOddsContactFromAgeDifference- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableAgeStratifiedNetworkConfiguration
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name
,replicate
,networkSize
,initialImports
,ageDistribution
,networkConnectedness
,networkRandomness
,oddsContactFromAgeDifference
,normalisedOddsContactFromAgeDifference
. -
toString
Prints the immutable valueAgeStratifiedNetworkConfiguration
with attribute values. -
copyOf
public static ImmutableAgeStratifiedNetworkConfiguration copyOf(AgeStratifiedNetworkConfiguration instance) Creates an immutable copy of aAgeStratifiedNetworkConfiguration
value. 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 AgeStratifiedNetworkConfiguration instance
-
toBuilder
Creates a builder forImmutableAgeStratifiedNetworkConfiguration
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableAgeStratifiedNetworkConfiguration builder with attributes of
this
instance
-
builder
Creates a builder forImmutableAgeStratifiedNetworkConfiguration
.ImmutableAgeStratifiedNetworkConfiguration.builder() .setName(String) // required
name
.setReplicate(Integer) // optionalreplicate
.setNetworkSize(Integer) // requirednetworkSize
.setInitialImports(Integer) // requiredinitialImports
.setAgeDistribution(io.github.ai4ci.util.EmpiricalDistribution) // requiredageDistribution
.setNetworkConnectedness(int) // requirednetworkConnectedness
.setNetworkRandomness(double) // requirednetworkRandomness
.setOddsContactFromAgeDifference(io.github.ai4ci.abm.mechanics.Abstraction.SimpleFunction) // requiredoddsContactFromAgeDifference
.setNormalisedOddsContactFromAgeDifference(io.github.ai4ci.abm.mechanics.Abstraction.SimpleFunction) // optionalnormalisedOddsContactFromAgeDifference
.build();- Returns:
- A new ImmutableAgeStratifiedNetworkConfiguration builder
-