Package org.kigalisim.engine.state
Class OverridingConverterStateGetter
java.lang.Object
org.kigalisim.engine.state.OverridingConverterStateGetter
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionOverridingConverterStateGetter(StateGetter innerGetter) Create a new overriding converter state getter. -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the amortized unit volume override to use the inner getter's value.voidClear the population override to use the inner getter's value.voidClear the volume override to use the inner getter's value.Get the amortized unit consumption value.Get the amortized unit volume value.Get the energy consumption value.Get the energy intensity value.Get the GHG consumption value.Get the population value.getPopulationChange(UnitConverter unitConverter) Get the population change value.Get the prior GHG consumption value.Get the prior population value.Get the prior volume value.Get the prior years elapsed value.Get the substance consumption value.Get the volume value.Get the years elapsed value.voidsetAmortizedUnitConsumption(EngineNumber newValue) Set the amortized unit consumption value.voidsetAmortizedUnitVolume(EngineNumber newValue) Set the amortized unit volume value.voidsetConsumption(EngineNumber newValue) Set the consumption value.voidsetEnergyConsumption(EngineNumber newValue) Set the energy consumption equivalency.voidsetEnergyIntensity(EngineNumber newValue) Set the energy intensity value.voidsetPopulation(EngineNumber newValue) Set the population value.voidsetPopulationChange(EngineNumber newValue) Set the population change value.voidsetPriorGhgConsumption(EngineNumber newValue) Set the prior GHG consumption value.voidsetPriorPopulation(EngineNumber newValue) Set the prior population value.voidsetPriorVolume(EngineNumber newValue) Set the prior volume value.voidsetPriorYearsElapsed(EngineNumber newValue) Set the prior years elapsed value.voidsetSubstanceConsumption(EngineNumber newValue) Set the substance consumption value.voidsetTotal(String streamName, EngineNumber value) Set total values for different stream types.voidsetVolume(EngineNumber newValue) Set the volume value.voidsetYearsElapsed(EngineNumber newValue) Set the years elapsed value.
-
Constructor Details
-
OverridingConverterStateGetter
Create a new overriding converter state getter.- Parameters:
innerGetter- The base state getter to wrap
-
-
Method Details
-
setTotal
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
Set the substance consumption value.- Parameters:
newValue- The new substance consumption value
-
getSubstanceConsumption
Get the substance consumption value.- Specified by:
getSubstanceConsumptionin interfaceStateGetter- Returns:
- The substance consumption value
-
setEnergyIntensity
Set the energy intensity value.- Parameters:
newValue- The new energy intensity value
-
getEnergyIntensity
Get the energy intensity value.- Specified by:
getEnergyIntensityin interfaceStateGetter- Returns:
- The energy intensity value
-
setAmortizedUnitVolume
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
Get the amortized unit volume value.- Specified by:
getAmortizedUnitVolumein interfaceStateGetter- Returns:
- The amortized unit volume value
-
setPopulation
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
Get the population value.- Specified by:
getPopulationin interfaceStateGetter- Returns:
- The population value
-
setYearsElapsed
Set the years elapsed value.- Parameters:
newValue- The new years elapsed value
-
getYearsElapsed
Get the years elapsed value.- Specified by:
getYearsElapsedin interfaceStateGetter- Returns:
- The years elapsed value
-
setConsumption
Set the consumption value.- Parameters:
newValue- The new consumption value
-
setEnergyConsumption
Set the energy consumption equivalency.- Parameters:
newValue- The new energy consumption value
-
getGhgConsumption
Get the GHG consumption value.- Specified by:
getGhgConsumptionin interfaceStateGetter- Returns:
- The GHG consumption value
-
getEnergyConsumption
Get the energy consumption value.- Specified by:
getEnergyConsumptionin interfaceStateGetter- Returns:
- The energy consumption value
-
setVolume
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
Get the volume value.- Specified by:
getVolumein interfaceStateGetter- Returns:
- The volume value
-
setAmortizedUnitConsumption
Set the amortized unit consumption value.- Parameters:
newValue- The new amortized unit consumption value
-
getAmortizedUnitConsumption
Get the amortized unit consumption value.- Specified by:
getAmortizedUnitConsumptionin interfaceStateGetter- Returns:
- The amortized unit consumption value
-
setPopulationChange
Set the population change value.- Parameters:
newValue- The new population change value
-
getPopulationChange
Get the population change value.- Specified by:
getPopulationChangein interfaceStateGetter- Parameters:
unitConverter- Converter for ensuring consistent units- Returns:
- The population change value
-
setPriorVolume
Set the prior volume value.- Parameters:
newValue- The new prior volume value
-
getPriorVolume
Get the prior volume value.- Specified by:
getPriorVolumein interfaceStateGetter- Returns:
- The prior volume value
-
setPriorGhgConsumption
Set the prior GHG consumption value.- Parameters:
newValue- The new prior GHG consumption value
-
getPriorGhgConsumption
Get the prior GHG consumption value.- Specified by:
getPriorGhgConsumptionin interfaceStateGetter- Returns:
- The prior GHG consumption value
-
setPriorPopulation
Set the prior population value.- Parameters:
newValue- The new prior population value
-
getPriorPopulation
Get the prior population value.- Specified by:
getPriorPopulationin interfaceStateGetter- Returns:
- The prior population value
-
setPriorYearsElapsed
Set the prior years elapsed value.- Parameters:
newValue- The new prior years elapsed value
-
getPriorYearsElapsed
Get the prior years elapsed value.- Specified by:
getPriorYearsElapsedin interfaceStateGetter- Returns:
- The prior years elapsed value
-