Class ImmutableContactCSV

java.lang.Object
io.github.ai4ci.output.ImmutableContactCSV
All Implemented Interfaces:
CSVWriter.Writeable, CommonCSV.Execution, CommonCSV.Model, CommonCSV.State, ContactCSV

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

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

  • Method Details

    • getModelName

      public String getModelName()
      Specified by:
      getModelName in interface CommonCSV.Model
      Returns:
      The value of the modelName attribute
    • getExperimentName

      public String getExperimentName()
      Specified by:
      getExperimentName in interface CommonCSV.Model
      Returns:
      The value of the experimentName attribute
    • getModelReplica

      public int getModelReplica()
      Specified by:
      getModelReplica in interface CommonCSV.Execution
      Returns:
      The value of the modelReplica attribute
    • getExperimentReplica

      public int getExperimentReplica()
      Specified by:
      getExperimentReplica in interface CommonCSV.Execution
      Returns:
      The value of the experimentReplica attribute
    • getTime

      public int getTime()
      Specified by:
      getTime in interface CommonCSV.State
      Returns:
      The value of the time attribute
    • getId

      public int getId()
      Specified by:
      getId in interface ContactCSV
      Returns:
      The value of the id attribute
    • getContactId

      public int getContactId()
      Specified by:
      getContactId in interface ContactCSV
      Returns:
      The value of the contactId attribute
    • isDetected

      public boolean isDetected()
      Specified by:
      isDetected in interface ContactCSV
      Returns:
      The value of the detected attribute
    • withModelName

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

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

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

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

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableContactCSV 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: modelName, experimentName, modelReplica, experimentReplica, time, id, contactId, detected.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableContactCSV copyOf(ContactCSV instance)
      Creates an immutable copy of a ContactCSV 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 ContactCSV instance
    • toBuilder

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

      public static ImmutableContactCSV.Builder builder()
      Creates a builder for ImmutableContactCSV.
       ImmutableContactCSV.builder()
          .setModelName(String) // required modelName
          .setExperimentName(String) // required experimentName
          .setModelReplica(int) // required modelReplica
          .setExperimentReplica(int) // required experimentReplica
          .setTime(int) // required time
          .setId(int) // required id
          .setContactId(int) // required contactId
          .setDetected(boolean) // required detected
          .build();
       
      Returns:
      A new ImmutableContactCSV builder