Record Class IncrementalUnitsCapacityStudy.IncrementalStep

java.lang.Object
java.lang.Record
com.amalgamasimulation.studies.core.IncrementalUnitsCapacityStudy.IncrementalStep
Enclosing class:
IncrementalUnitsCapacityStudy

public static record IncrementalUnitsCapacityStudy.IncrementalStep(IncrementalUnitsCapacityStudy study, int stepIndex, int parentStepIndex, ScenarioStudyStep baselineStudyStep, ScenarioStudyStep parentStudyStep, ScenarioStudyStep studyStep, String unitId, DistributionStatistics parentUtilization, DistributionStatistics baselineOutput, DistributionStatistics parentOutput) extends Record
  • Constructor Details

    • IncrementalStep

      public IncrementalStep(IncrementalUnitsCapacityStudy study, int stepIndex, int parentStepIndex, ScenarioStudyStep baselineStudyStep, ScenarioStudyStep parentStudyStep, ScenarioStudyStep studyStep, String unitId, DistributionStatistics parentUtilization, DistributionStatistics baselineOutput, DistributionStatistics parentOutput)
      Creates an instance of a IncrementalStep record class.
      Parameters:
      study - the value for the study record component
      stepIndex - the value for the stepIndex record component
      parentStepIndex - the value for the parentStepIndex record component
      baselineStudyStep - the value for the baselineStudyStep record component
      parentStudyStep - the value for the parentStudyStep record component
      studyStep - the value for the studyStep record component
      unitId - the value for the unitId record component
      parentUtilization - the value for the parentUtilization record component
      baselineOutput - the value for the baselineOutput record component
      parentOutput - the value for the parentOutput record component
  • Method Details

    • output

      public DistributionStatistics output()
      Output statistics of this incremented study step.
    • outputToBaselineComparison

      public DistributionComparison outputToBaselineComparison()
      Compares the output of this incremented step to the baseline scenario's output.
      Returns:
      a DistributionComparison between this step and the baseline
    • outputToParentComparison

      public DistributionComparison outputToParentComparison()
      Compares the output of this incremented step to the output of its parent scenario step.
      Returns:
      a DistributionComparison between this step and its parent step
    • 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.
    • study

      Returns the value of the study record component.
      Returns:
      the value of the study record component
    • stepIndex

      public int stepIndex()
      Returns the value of the stepIndex record component.
      Returns:
      the value of the stepIndex record component
    • parentStepIndex

      public int parentStepIndex()
      Returns the value of the parentStepIndex record component.
      Returns:
      the value of the parentStepIndex record component
    • baselineStudyStep

      public ScenarioStudyStep baselineStudyStep()
      Returns the value of the baselineStudyStep record component.
      Returns:
      the value of the baselineStudyStep record component
    • parentStudyStep

      public ScenarioStudyStep parentStudyStep()
      Returns the value of the parentStudyStep record component.
      Returns:
      the value of the parentStudyStep record component
    • studyStep

      public ScenarioStudyStep studyStep()
      Returns the value of the studyStep record component.
      Returns:
      the value of the studyStep record component
    • unitId

      public String unitId()
      Returns the value of the unitId record component.
      Returns:
      the value of the unitId record component
    • parentUtilization

      public DistributionStatistics parentUtilization()
      Returns the value of the parentUtilization record component.
      Returns:
      the value of the parentUtilization record component
    • baselineOutput

      public DistributionStatistics baselineOutput()
      Returns the value of the baselineOutput record component.
      Returns:
      the value of the baselineOutput record component
    • parentOutput

      public DistributionStatistics parentOutput()
      Returns the value of the parentOutput record component.
      Returns:
      the value of the parentOutput record component