Package io.github.ai4ci.config
Class ImmutableWattsStrogatzFacet
java.lang.Object
io.github.ai4ci.config.ImmutableWattsStrogatzFacet
- All Implemented Interfaces:
Abstraction.Named
,ExperimentFacet.SetupFacet<WattsStrogatzConfiguration>
,ExperimentFacet.WattsStrogatzFacet
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableWattsStrogatzFacet
extends Object
implements ExperimentFacet.WattsStrogatzFacet
Immutable implementation of
ExperimentFacet.WattsStrogatzFacet
.
Use the builder to create immutable instances:
ImmutableWattsStrogatzFacet.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableWattsStrogatzFacet
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableWattsStrogatzFacet
.static ImmutableWattsStrogatzFacet
copyOf
(ExperimentFacet.WattsStrogatzFacet instance) Creates an immutable copy of aExperimentFacet.WattsStrogatzFacet
value.boolean
This instance is equal to all instances ofImmutableWattsStrogatzFacet
that have equal attribute values.com.google.common.collect.ImmutableList<PartialWattsStrogatzConfiguration>
getName()
int
hashCode()
Computes a hash code from attributes:getDefault
,name
,modifications
.Creates a builder forImmutableWattsStrogatzFacet
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueWattsStrogatzFacet
with attribute values.Copy the current immutable object by setting a value for thedefault
attribute.withModifications
(PartialWattsStrogatzConfiguration... elements) Copy the current immutable object with elements that replace the content ofmodifications
.withModifications
(Iterable<? extends PartialWattsStrogatzConfiguration> elements) Copy the current immutable object with elements that replace the content ofmodifications
.Copy the current immutable object by setting a value for thename
attribute.
-
Method Details
-
getDefault
- Specified by:
getDefault
in interfaceExperimentFacet.SetupFacet<WattsStrogatzConfiguration>
- Returns:
- The value of the
getDefault
attribute
-
getName
- Specified by:
getName
in interfaceAbstraction.Named
- Specified by:
getName
in interfaceExperimentFacet.SetupFacet<WattsStrogatzConfiguration>
- Returns:
- The value of the
name
attribute
-
getModifications
public com.google.common.collect.ImmutableList<PartialWattsStrogatzConfiguration> getModifications()- Specified by:
getModifications
in interfaceExperimentFacet.SetupFacet<WattsStrogatzConfiguration>
- Specified by:
getModifications
in interfaceExperimentFacet.WattsStrogatzFacet
- Returns:
- The value of the
modifications
attribute
-
withDefault
Copy the current immutable object by setting a value for thedefault
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for getDefault- Returns:
- A modified copy of the
this
object
-
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
.- Parameters:
value
- A new value for name- Returns:
- A modified copy of the
this
object
-
withModifications
public final ImmutableWattsStrogatzFacet withModifications(PartialWattsStrogatzConfiguration... elements) Copy the current immutable object with elements that replace the content ofmodifications
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withModifications
public final ImmutableWattsStrogatzFacet withModifications(Iterable<? extends PartialWattsStrogatzConfiguration> elements) Copy the current immutable object with elements that replace the content ofmodifications
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of modifications elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableWattsStrogatzFacet
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:getDefault
,name
,modifications
. -
toString
Prints the immutable valueWattsStrogatzFacet
with attribute values. -
copyOf
Creates an immutable copy of aExperimentFacet.WattsStrogatzFacet
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 WattsStrogatzFacet instance
-
toBuilder
Creates a builder forImmutableWattsStrogatzFacet
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableWattsStrogatzFacet builder with attributes of
this
instance
-
builder
Creates a builder forImmutableWattsStrogatzFacet
.ImmutableWattsStrogatzFacet.builder() .setDefault(io.github.ai4ci.config.setup.WattsStrogatzConfiguration) // required
default
.setName(String) // optionalname
.addModification|addAllModifications(io.github.ai4ci.config.setup.PartialWattsStrogatzConfiguration) //modifications
elements .build();- Returns:
- A new ImmutableWattsStrogatzFacet builder
-