Record Class NumericAttributeVariationAxis

java.lang.Object
java.lang.Record
com.amalgamasimulation.studies.core.NumericAttributeVariationAxis
All Implemented Interfaces:
NumericVariationAxis

public record NumericAttributeVariationAxis(String typeName, String fieldName, boolean absolute, NumericVariationScope scope, List<String> objectIdentifiers) extends Record implements NumericVariationAxis
Represents a variation axis for a numeric attribute in a simulation study. This axis defines a sequence of values between the minimum and the maximum, spaced by the step, for applying changes to a specific numeric field of EMF data model objects.

The variation can be either:

  • Absolute: The values generated by this axis directly replace the attribute's value.
  • Relative: The values are treated as multipliers (e.g., 1.1 = +10%) applied to the attribute’s base value.
Author:
Andrey Malykhanov
  • Constructor Details

    • NumericAttributeVariationAxis

      public NumericAttributeVariationAxis(String typeName, String fieldName, boolean absolute, NumericVariationScope scope, List<String> objectIdentifiers)
      Creates an instance of a NumericAttributeVariationAxis record class.
      Parameters:
      typeName - the value for the typeName record component
      fieldName - the value for the fieldName record component
      absolute - the value for the absolute record component
      scope - the value for the scope record component
      objectIdentifiers - the value for the objectIdentifiers record component
  • Method Details

    • description

      public String description()
      Returns a human-readable description of the variation axis.
      Specified by:
      description in interface NumericVariationAxis
      Returns:
      a string such as "Absolute variation of setupDuration of DrillingMachineType"
    • createModification

      public Modification createModification(double value)
      Specified by:
      createModification in interface NumericVariationAxis
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • typeName

      public String typeName()
      Returns the value of the typeName record component.
      Returns:
      the value of the typeName record component
    • fieldName

      public String fieldName()
      Returns the value of the fieldName record component.
      Returns:
      the value of the fieldName record component
    • absolute

      public boolean absolute()
      Returns the value of the absolute record component.
      Returns:
      the value of the absolute record component
    • scope

      public NumericVariationScope scope()
      Returns the value of the scope record component.
      Specified by:
      scope in interface NumericVariationAxis
      Returns:
      the value of the scope record component
    • objectIdentifiers

      public List<String> objectIdentifiers()
      Returns the value of the objectIdentifiers record component.
      Returns:
      the value of the objectIdentifiers record component