Class ImmutableExecutionFacet

java.lang.Object
io.github.ai4ci.config.ImmutableExecutionFacet
All Implemented Interfaces:
Abstraction.Named, ExperimentFacet.ExecutionFacet

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableExecutionFacet extends Object implements ExperimentFacet.ExecutionFacet
Immutable implementation of ExperimentFacet.ExecutionFacet.

Use the builder to create immutable instances: ImmutableExecutionFacet.builder().

  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Abstraction.Named
      Returns:
      The value of the name attribute
    • getModifications

      public com.google.common.collect.ImmutableList<PartialExecutionConfiguration> getModifications()
      Specified by:
      getModifications in interface ExperimentFacet.ExecutionFacet
      Returns:
      The value of the modifications attribute
    • withName

      public final ImmutableExecutionFacet withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy of the this object
    • withModifications

      public final ImmutableExecutionFacet withModifications(PartialExecutionConfiguration... elements)
      Copy the current immutable object with elements that replace the content of modifications.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withModifications

      public final ImmutableExecutionFacet withModifications(Iterable<? extends PartialExecutionConfiguration> elements)
      Copy the current immutable object with elements that replace the content of modifications. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of modifications elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableExecutionFacet 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: name, modifications.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a ExperimentFacet.ExecutionFacet 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 ExecutionFacet instance
    • toBuilder

      public ImmutableExecutionFacet.Builder toBuilder()
      Creates a builder for ImmutableExecutionFacet.prefilled with attibute values of this instance to easily create modified copies.
      Returns:
      A new ImmutableExecutionFacet builder with attributes of this instance
    • builder

      public static ImmutableExecutionFacet.Builder builder()
      Creates a builder for ImmutableExecutionFacet.
       ImmutableExecutionFacet.builder()
          .setName(String) // required name
          .addModification|addAllModifications(io.github.ai4ci.config.PartialExecutionConfiguration) // modifications elements
          .build();
       
      Returns:
      A new ImmutableExecutionFacet builder