Package io.github.ai4ci.config
Class ImmutableExperimentConfiguration
java.lang.Object
io.github.ai4ci.config.ImmutableExperimentConfiguration
- All Implemented Interfaces:
ExperimentConfiguration
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableExperimentConfiguration
extends Object
implements ExperimentConfiguration
Immutable implementation of
ExperimentConfiguration
.
Use the builder to create immutable instances:
ImmutableExperimentConfiguration.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableExperimentConfiguration
. -
Field Summary
Fields inherited from interface io.github.ai4ci.config.ExperimentConfiguration
DEFAULT
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableExperimentConfiguration
.copyOf
(ExperimentConfiguration instance) Creates an immutable copy of aExperimentConfiguration
value.boolean
This instance is equal to all instances ofImmutableExperimentConfiguration
that have equal attribute values.int
com.google.common.collect.ImmutableList<ImmutableExecutionFacet>
com.google.common.collect.ImmutableList<ExperimentFacet.SetupFacet<?>>
int
int
hashCode()
Computes a hash code from attributes:batchConfig
,setupConfig
,setupReplications
,executionConfig
,facets
,executionReplications
.Creates a builder forImmutableExperimentConfiguration
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueExperimentConfiguration
with attribute values.Copy the current immutable object by setting a value for thebatchConfig
attribute.Copy the current immutable object by setting a value for theexecutionConfig
attribute.withExecutionReplications
(int value) Copy the current immutable object by setting a value for theexecutionReplications
attribute.withFacets
(ImmutableExecutionFacet... elements) Copy the current immutable object with elements that replace the content offacets
.withFacets
(Iterable<? extends ImmutableExecutionFacet> elements) Copy the current immutable object with elements that replace the content offacets
.withSetupConfig
(ExperimentFacet.SetupFacet<?>... elements) Copy the current immutable object with elements that replace the content ofsetupConfig
.withSetupConfig
(Iterable<? extends ExperimentFacet.SetupFacet<?>> elements) Copy the current immutable object with elements that replace the content ofsetupConfig
.withSetupReplications
(int value) Copy the current immutable object by setting a value for thesetupReplications
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.config.ExperimentConfiguration
exporter, getBatchDirectoryPath, getBatchSetupList, getExecution, getSetup, withFacet, withSetupConfig, writeConfig
-
Method Details
-
getBatchConfig
- Specified by:
getBatchConfig
in interfaceExperimentConfiguration
- Returns:
- The value of the
batchConfig
attribute
-
getSetupConfig
- Specified by:
getSetupConfig
in interfaceExperimentConfiguration
- Returns:
- The value of the
setupConfig
attribute
-
getSetupReplications
public int getSetupReplications()- Specified by:
getSetupReplications
in interfaceExperimentConfiguration
- Returns:
- The value of the
setupReplications
attribute
-
getExecutionConfig
- Specified by:
getExecutionConfig
in interfaceExperimentConfiguration
- Returns:
- The value of the
executionConfig
attribute
-
getFacets
- Specified by:
getFacets
in interfaceExperimentConfiguration
- Returns:
- The value of the
facets
attribute
-
getExecutionReplications
public int getExecutionReplications()- Specified by:
getExecutionReplications
in interfaceExperimentConfiguration
- Returns:
- The value of the
executionReplications
attribute
-
withBatchConfig
Copy the current immutable object by setting a value for thebatchConfig
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for batchConfig- Returns:
- A modified copy of the
this
object
-
withSetupConfig
@SafeVarargs public final ImmutableExperimentConfiguration withSetupConfig(ExperimentFacet.SetupFacet<?>... elements) Copy the current immutable object with elements that replace the content ofsetupConfig
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withSetupConfig
public final ImmutableExperimentConfiguration withSetupConfig(Iterable<? extends ExperimentFacet.SetupFacet<?>> elements) Copy the current immutable object with elements that replace the content ofsetupConfig
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of setupConfig elements to set- Returns:
- A modified copy of
this
object
-
withSetupReplications
Copy the current immutable object by setting a value for thesetupReplications
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for setupReplications- Returns:
- A modified copy of the
this
object
-
withExecutionConfig
public final ImmutableExperimentConfiguration withExecutionConfig(ImmutableExecutionConfiguration value) Copy the current immutable object by setting a value for theexecutionConfig
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Specified by:
withExecutionConfig
in interfaceExperimentConfiguration
- Parameters:
value
- A new value for executionConfig- Returns:
- A modified copy of the
this
object
-
withFacets
Copy the current immutable object with elements that replace the content offacets
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withFacets
public final ImmutableExperimentConfiguration withFacets(Iterable<? extends ImmutableExecutionFacet> elements) Copy the current immutable object with elements that replace the content offacets
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of facets elements to set- Returns:
- A modified copy of
this
object
-
withExecutionReplications
Copy the current immutable object by setting a value for theexecutionReplications
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for executionReplications- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableExperimentConfiguration
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:batchConfig
,setupConfig
,setupReplications
,executionConfig
,facets
,executionReplications
. -
toString
Prints the immutable valueExperimentConfiguration
with attribute values. -
copyOf
Creates an immutable copy of aExperimentConfiguration
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 ExperimentConfiguration instance
-
toBuilder
Creates a builder forImmutableExperimentConfiguration
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableExperimentConfiguration builder with attributes of
this
instance
-
builder
Creates a builder forImmutableExperimentConfiguration
.ImmutableExperimentConfiguration.builder() .setBatchConfig(io.github.ai4ci.config.ImmutableBatchConfiguration) // required
batchConfig
.addSetupConfig|addAllSetupConfig(io.github.ai4ci.config.ExperimentFacet.SetupFacet<?>) //setupConfig
elements .setSetupReplications(int) // requiredsetupReplications
.setExecutionConfig(io.github.ai4ci.config.ImmutableExecutionConfiguration) // requiredexecutionConfig
.addFacet|addAllFacets(ImmutableExecutionFacet) //facets
elements .setExecutionReplications(int) // requiredexecutionReplications
.build();- Returns:
- A new ImmutableExperimentConfiguration builder
-