Interface PriorEquipmentBases

All Known Implementing Classes:
FrozenPriorEquipmentBases, MutablePriorEquipmentBases

public interface PriorEquipmentBases
State supporting cumulative retirement / recharge base tracking (prior equip).

Implemented by MutablePriorEquipmentBases for live, mutable tracking during a simulation step and by FrozenPriorEquipmentBases for immutable snapshots captured for prior-year lookups.

  • Method Details

    • getRetirementBasePopulation

      Optional<EngineNumber> getRetirementBasePopulation()
      Get the retirement base population.
      Returns:
      The base population, or empty if not yet captured this step
    • setRetirementBasePopulation

      void setRetirementBasePopulation(EngineNumber value)
      Set the retirement base population.
      Parameters:
      value - The base population value
    • getAppliedRetirementAmount

      Optional<EngineNumber> getAppliedRetirementAmount()
      Get the applied retirement amount.
      Returns:
      The total amount already retired this step
    • setAppliedRetirementAmount

      void setAppliedRetirementAmount(EngineNumber value)
      Set the applied retirement amount.
      Parameters:
      value - The total amount retired this step
    • getHasReplacementThisStep

      boolean getHasReplacementThisStep()
      Get whether replacement was used in this step's retire commands.
      Returns:
      true if with replacement, false if without replacement
    • setHasReplacementThisStep

      void setHasReplacementThisStep(boolean value)
      Set whether replacement is used in this step's retire commands.
      Parameters:
      value - true for with replacement, false for without replacement
    • getRetireCalculatedThisStep

      boolean getRetireCalculatedThisStep()
      Get whether retire has been calculated this step.
      Returns:
      true if retire was calculated, false otherwise
    • setRetireCalculatedThisStep

      void setRetireCalculatedThisStep(boolean calculated)
      Set whether retire has been calculated this step.
      Parameters:
      calculated - true if retire was calculated, false otherwise
    • getRechargeBasePopulation

      Optional<EngineNumber> getRechargeBasePopulation()
      Get the recharge base population.
      Returns:
      The base population, or empty if not yet captured this step
    • setRechargeBasePopulation

      void setRechargeBasePopulation(EngineNumber value)
      Set the recharge base population.
      Parameters:
      value - The base population value
    • getAppliedRechargeAmount

      Optional<EngineNumber> getAppliedRechargeAmount()
      Get the applied recharge amount.
      Returns:
      The total amount already recharged this step in kg
    • setAppliedRechargeAmount

      void setAppliedRechargeAmount(EngineNumber value)
      Set the applied recharge amount.
      Parameters:
      value - The total amount recharged this step in kg
    • getPrechargeBasePopulation

      Optional<EngineNumber> getPrechargeBasePopulation()
      Get the precharge base population.
      Returns:
      The base population, or empty if not yet captured this step
    • setPrechargeBasePopulation

      void setPrechargeBasePopulation(EngineNumber value)
      Set the precharge base population.
      Parameters:
      value - The base population value
    • getAppliedPrechargeAmount

      Optional<EngineNumber> getAppliedPrechargeAmount()
      Get the applied precharge amount.
      Returns:
      The total amount already precharged this step in kg
    • setAppliedPrechargeAmount

      void setAppliedPrechargeAmount(EngineNumber value)
      Set the applied precharge amount.
      Parameters:
      value - The total amount precharged this step in kg
    • getRecyclingCalculatedThisStep

      boolean getRecyclingCalculatedThisStep()
      Get whether recycling has been calculated this step.
      Returns:
      true if recycling was calculated, false otherwise
    • setRecyclingCalculatedThisStep

      void setRecyclingCalculatedThisStep(boolean calculated)
      Set whether recycling has been calculated this step.
      Parameters:
      calculated - true if recycling was calculated, false otherwise
    • resetStateAtTimestep

      void resetStateAtTimestep()
      Reset all tracking state at the beginning of a timestep.
    • freeze

      Get an immutable snapshot of this instance.

      The snapshot shares immutable EngineNumber-typed values by reference but does not share mutable containers, so later mutation of this instance does not affect the snapshot.

      Returns:
      An immutable snapshot backed by FrozenPriorEquipmentBases, or this same instance if it is already frozen