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().

  • Method Details

    • getBatchConfig

      public ImmutableBatchConfiguration getBatchConfig()
      Specified by:
      getBatchConfig in interface ExperimentConfiguration
      Returns:
      The value of the batchConfig attribute
    • getSetupConfig

      public com.google.common.collect.ImmutableList<ExperimentFacet.SetupFacet<?>> getSetupConfig()
      Specified by:
      getSetupConfig in interface ExperimentConfiguration
      Returns:
      The value of the setupConfig attribute
    • getSetupReplications

      public int getSetupReplications()
      Specified by:
      getSetupReplications in interface ExperimentConfiguration
      Returns:
      The value of the setupReplications attribute
    • getExecutionConfig

      public ImmutableExecutionConfiguration getExecutionConfig()
      Specified by:
      getExecutionConfig in interface ExperimentConfiguration
      Returns:
      The value of the executionConfig attribute
    • getFacets

      public com.google.common.collect.ImmutableList<ImmutableExecutionFacet> getFacets()
      Specified by:
      getFacets in interface ExperimentConfiguration
      Returns:
      The value of the facets attribute
    • getExecutionReplications

      public int getExecutionReplications()
      Specified by:
      getExecutionReplications in interface ExperimentConfiguration
      Returns:
      The value of the executionReplications attribute
    • withBatchConfig

      public final ImmutableExperimentConfiguration withBatchConfig(ImmutableBatchConfiguration value)
      Copy the current immutable object by setting a value for the batchConfig attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      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 of setupConfig.
      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 of setupConfig. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of setupConfig elements to set
      Returns:
      A modified copy of this object
    • withSetupReplications

      public final ImmutableExperimentConfiguration withSetupReplications(int value)
      Copy the current immutable object by setting a value for the setupReplications attribute. A value equality check is used to prevent copying of the same value by returning this.
      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 the executionConfig attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Specified by:
      withExecutionConfig in interface ExperimentConfiguration
      Parameters:
      value - A new value for executionConfig
      Returns:
      A modified copy of the this object
    • withFacets

      public final ImmutableExperimentConfiguration withFacets(ImmutableExecutionFacet... elements)
      Copy the current immutable object with elements that replace the content of facets.
      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 of facets. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of facets elements to set
      Returns:
      A modified copy of this object
    • withExecutionReplications

      public final ImmutableExperimentConfiguration withExecutionReplications(int value)
      Copy the current immutable object by setting a value for the executionReplications attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for executionReplications
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableExperimentConfiguration that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: batchConfig, setupConfig, setupReplications, executionConfig, facets, executionReplications.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ExperimentConfiguration with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a ExperimentConfiguration 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 for ImmutableExperimentConfiguration.prefilled with attibute values of this instance to easily create modified copies.
      Returns:
      A new ImmutableExperimentConfiguration builder with attributes of this instance
    • builder

      Creates a builder for ImmutableExperimentConfiguration.
       ImmutableExperimentConfiguration.builder()
          .setBatchConfig(io.github.ai4ci.config.ImmutableBatchConfiguration) // required batchConfig
          .addSetupConfig|addAllSetupConfig(io.github.ai4ci.config.ExperimentFacet.SetupFacet&lt;?&gt;) // setupConfig elements
          .setSetupReplications(int) // required setupReplications
          .setExecutionConfig(io.github.ai4ci.config.ImmutableExecutionConfiguration) // required executionConfig
          .addFacet|addAllFacets(ImmutableExecutionFacet) // facets elements
          .setExecutionReplications(int) // required executionReplications
          .build();
       
      Returns:
      A new ImmutableExperimentConfiguration builder