Class OverridingConverterStateGetter

java.lang.Object
org.kigalisim.engine.state.OverridingConverterStateGetter
All Implemented Interfaces:
StateGetter

public class OverridingConverterStateGetter extends Object implements StateGetter
State getter that allows overriding values from an inner state getter.

This class wraps an inner StateGetter and allows individual values to be overridden while delegating to the inner getter for non-overridden values.

License:
BSD-3-Clause
  • Constructor Details

    • OverridingConverterStateGetter

      public OverridingConverterStateGetter(StateGetter innerGetter)
      Create a new overriding converter state getter.
      Parameters:
      innerGetter - The base state getter to wrap
  • Method Details

    • setTotal

      public void setTotal(String streamName, EngineNumber value)
      Set total values for different stream types.
      Parameters:
      streamName - The name of the stream (sales, manufacture, import, etc.)
      value - The value to set for the stream
    • setSubstanceConsumption

      public void setSubstanceConsumption(EngineNumber newValue)
      Set the substance consumption value.
      Parameters:
      newValue - The new substance consumption value
    • getSubstanceConsumption

      public EngineNumber getSubstanceConsumption()
      Get the substance consumption value.
      Specified by:
      getSubstanceConsumption in interface StateGetter
      Returns:
      The substance consumption value
    • setEnergyIntensity

      public void setEnergyIntensity(EngineNumber newValue)
      Set the energy intensity value.
      Parameters:
      newValue - The new energy intensity value
    • getEnergyIntensity

      public EngineNumber getEnergyIntensity()
      Get the energy intensity value.
      Specified by:
      getEnergyIntensity in interface StateGetter
      Returns:
      The energy intensity value
    • setAmortizedUnitVolume

      public void setAmortizedUnitVolume(EngineNumber newValue)
      Set the amortized unit volume value.
      Parameters:
      newValue - The new amortized unit volume value
    • clearAmortizedUnitVolume

      public void clearAmortizedUnitVolume()
      Clear the amortized unit volume override to use the inner getter's value.
    • getAmortizedUnitVolume

      public EngineNumber getAmortizedUnitVolume()
      Get the amortized unit volume value.
      Specified by:
      getAmortizedUnitVolume in interface StateGetter
      Returns:
      The amortized unit volume value
    • setPopulation

      public void setPopulation(EngineNumber newValue)
      Set the population value.
      Parameters:
      newValue - The new population value
    • clearPopulation

      public void clearPopulation()
      Clear the population override to use the inner getter's value.
    • getPopulation

      public EngineNumber getPopulation()
      Get the population value.
      Specified by:
      getPopulation in interface StateGetter
      Returns:
      The population value
    • setYearsElapsed

      public void setYearsElapsed(EngineNumber newValue)
      Set the years elapsed value.
      Parameters:
      newValue - The new years elapsed value
    • getYearsElapsed

      public EngineNumber getYearsElapsed()
      Get the years elapsed value.
      Specified by:
      getYearsElapsed in interface StateGetter
      Returns:
      The years elapsed value
    • setConsumption

      public void setConsumption(EngineNumber newValue)
      Set the consumption value.
      Parameters:
      newValue - The new consumption value
    • setEnergyConsumption

      public void setEnergyConsumption(EngineNumber newValue)
      Set the energy consumption equivalency.
      Parameters:
      newValue - The new energy consumption value
    • getGhgConsumption

      public EngineNumber getGhgConsumption()
      Get the GHG consumption value.
      Specified by:
      getGhgConsumption in interface StateGetter
      Returns:
      The GHG consumption value
    • getEnergyConsumption

      public EngineNumber getEnergyConsumption()
      Get the energy consumption value.
      Specified by:
      getEnergyConsumption in interface StateGetter
      Returns:
      The energy consumption value
    • setVolume

      public void setVolume(EngineNumber newValue)
      Set the volume value.
      Parameters:
      newValue - The new volume value
    • clearVolume

      public void clearVolume()
      Clear the volume override to use the inner getter's value.
    • getVolume

      public EngineNumber getVolume()
      Get the volume value.
      Specified by:
      getVolume in interface StateGetter
      Returns:
      The volume value
    • setAmortizedUnitConsumption

      public void setAmortizedUnitConsumption(EngineNumber newValue)
      Set the amortized unit consumption value.
      Parameters:
      newValue - The new amortized unit consumption value
    • getAmortizedUnitConsumption

      public EngineNumber getAmortizedUnitConsumption()
      Get the amortized unit consumption value.
      Specified by:
      getAmortizedUnitConsumption in interface StateGetter
      Returns:
      The amortized unit consumption value
    • setPopulationChange

      public void setPopulationChange(EngineNumber newValue)
      Set the population change value.
      Parameters:
      newValue - The new population change value
    • getPopulationChange

      public EngineNumber getPopulationChange(UnitConverter unitConverter)
      Get the population change value.
      Specified by:
      getPopulationChange in interface StateGetter
      Parameters:
      unitConverter - Converter for ensuring consistent units
      Returns:
      The population change value
    • setPriorVolume

      public void setPriorVolume(EngineNumber newValue)
      Set the prior volume value.
      Parameters:
      newValue - The new prior volume value
    • getPriorVolume

      public EngineNumber getPriorVolume()
      Get the prior volume value.
      Specified by:
      getPriorVolume in interface StateGetter
      Returns:
      The prior volume value
    • setPriorGhgConsumption

      public void setPriorGhgConsumption(EngineNumber newValue)
      Set the prior GHG consumption value.
      Parameters:
      newValue - The new prior GHG consumption value
    • getPriorGhgConsumption

      public EngineNumber getPriorGhgConsumption()
      Get the prior GHG consumption value.
      Specified by:
      getPriorGhgConsumption in interface StateGetter
      Returns:
      The prior GHG consumption value
    • setPriorPopulation

      public void setPriorPopulation(EngineNumber newValue)
      Set the prior population value.
      Parameters:
      newValue - The new prior population value
    • getPriorPopulation

      public EngineNumber getPriorPopulation()
      Get the prior population value.
      Specified by:
      getPriorPopulation in interface StateGetter
      Returns:
      The prior population value
    • setPriorYearsElapsed

      public void setPriorYearsElapsed(EngineNumber newValue)
      Set the prior years elapsed value.
      Parameters:
      newValue - The new prior years elapsed value
    • getPriorYearsElapsed

      public EngineNumber getPriorYearsElapsed()
      Get the prior years elapsed value.
      Specified by:
      getPriorYearsElapsed in interface StateGetter
      Returns:
      The prior years elapsed value