Package org.kigalisim.engine.serializer
Class EngineResultBuilder
java.lang.Object
org.kigalisim.engine.serializer.EngineResultBuilder
Builder pattern implementation for creating EngineResult objects.
This builder ensures that all required fields are provided before constructing an EngineResult instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Check that the builder is complete and create a new result.Get the application value.Get the bank change kg value.Get the bank change tCO2e value.Get the bank kg value.Get the bank tCO2e value.Get the domestic consumption value.Get the domestic value.Get the energy consumption value.Get the end-of-life emissions value.Get the export consumption value.Get the export value.Get the import consumption value.Get the import value.Get the initial charge emissions value.Get the population new value.Get the population value.Get the recharge emissions value.Get the recycle consumption value.Get the recycle value.Get the scenario name value.Get the substance value.Get the trade supplement data.intGet the trial number value.intgetYear()Get the year value.setApplication(String application) Set the application for which a result is being given.setBankChangeKg(EngineNumber bankChangeKg) Set the bank change kg value.setBankChangeTco2e(EngineNumber bankChangeTco2e) Set the bank change tCO2e value.setBankKg(EngineNumber bankKg) Set the bank kg value.setBankTco2e(EngineNumber bankTco2e) Set the bank tCO2e value.setDomesticConsumptionValue(EngineNumber domesticConsumptionValue) Set the domestic consumption value.setDomesticValue(EngineNumber domesticValue) Set the domestic value.setEnergyConsumption(EngineNumber energyConsumption) Set the energy consumption value.setEolEmissions(EngineNumber eolEmissions) Set the end-of-life emissions value.setExportConsumptionValue(EngineNumber exportConsumptionValue) Set the export consumption value.setExportValue(EngineNumber exportValue) Set the export value.setImportConsumptionValue(EngineNumber importConsumptionValue) Set the import consumption value.setImportValue(EngineNumber importValue) Set the import value.setInitialChargeEmissions(EngineNumber initialChargeEmissions) Set the initial charge emissions value.setPopulationNew(EngineNumber populationNew) Set the population new value.setPopulationValue(EngineNumber populationValue) Set the population value.setRechargeEmissions(EngineNumber rechargeEmissions) Set the recharge emissions value.setRecycleConsumptionValue(EngineNumber recycleConsumptionValue) Set the recycle consumption value.setRecycleValue(EngineNumber recycleValue) Set the recycle value.setScenarioName(String scenarioName) Set the scenario name for which a result is being given.setSubstance(String substance) Set the substance for which a result is being given.setTradeSupplement(TradeSupplement tradeSupplement) Set the trade supplement data.setTrialNumber(int trialNumber) Set the trial number for which a result is being given.setYear(int year) Set the year for which a result is being given.
-
Constructor Details
-
EngineResultBuilder
public EngineResultBuilder()Create builder without any values initialized.
-
-
Method Details
-
setApplication
Set the application for which a result is being given.- Parameters:
application- The application name like "commercialRefrigeration"- Returns:
- This builder for method chaining
-
setSubstance
Set the substance for which a result is being given.- Parameters:
substance- The substance name like "HFC-134a"- Returns:
- This builder for method chaining
-
setYear
Set the year for which a result is being given.- Parameters:
year- The year for which the result is relevant- Returns:
- This builder for method chaining
-
setScenarioName
Set the scenario name for which a result is being given.- Parameters:
scenarioName- The name of the scenario being run- Returns:
- This builder for method chaining
-
setTrialNumber
Set the trial number for which a result is being given.- Parameters:
trialNumber- The trial number of the current run- Returns:
- This builder for method chaining
-
setDomesticValue
Set the domestic value.- Parameters:
domesticValue- The value associated with domestic production in volume like kg- Returns:
- This builder for method chaining
-
setImportValue
Set the import value.- Parameters:
importValue- The value related to imports like in volume like kg- Returns:
- This builder for method chaining
-
setRecycleValue
Set the recycle value.- Parameters:
recycleValue- The value denoting recycled materials in volume like kg- Returns:
- This builder for method chaining
-
setDomesticConsumptionValue
Set the domestic consumption value.- Parameters:
domesticConsumptionValue- The domestic consumption value in tCO2e or equivalent- Returns:
- This builder for method chaining
-
setImportConsumptionValue
Set the import consumption value.- Parameters:
importConsumptionValue- The import consumption value in tCO2e or equivalent- Returns:
- This builder for method chaining
-
setRecycleConsumptionValue
Set the recycle consumption value.- Parameters:
recycleConsumptionValue- The recycle consumption value in tCO2e or equivalent- Returns:
- This builder for method chaining
-
setPopulationValue
Set the population value.- Parameters:
populationValue- The population value in terms of equipment- Returns:
- This builder for method chaining
-
setPopulationNew
Set the population new value.- Parameters:
populationNew- The amount of new equipment added this year- Returns:
- This builder for method chaining
-
setRechargeEmissions
Set the recharge emissions value.- Parameters:
rechargeEmissions- The greenhouse gas emissions from recharge activities- Returns:
- This builder for method chaining
-
setEolEmissions
Set the end-of-life emissions value.- Parameters:
eolEmissions- The greenhouse gas emissions from end-of-life equipment- Returns:
- This builder for method chaining
-
setInitialChargeEmissions
Set the initial charge emissions value.This is an informational metric representing the GHG potential of substance initially charged into equipment. Actual emissions occur later during recharge (leakage between servicings) or at end-of-life disposal.
- Parameters:
initialChargeEmissions- The greenhouse gas emissions from initial charge activities- Returns:
- This builder for method chaining
-
setEnergyConsumption
Set the energy consumption value.- Parameters:
energyConsumption- The energy consumption value- Returns:
- This builder for method chaining
-
setExportValue
Set the export value.- Parameters:
exportValue- The export value in volume like kg- Returns:
- This builder for method chaining
-
setExportConsumptionValue
Set the export consumption value.- Parameters:
exportConsumptionValue- The export consumption value in tCO2e or equivalent- Returns:
- This builder for method chaining
-
setTradeSupplement
Set the trade supplement data.- Parameters:
tradeSupplement- Supplemental trade information- Returns:
- This builder for method chaining
-
setBankKg
Set the bank kg value.- Parameters:
bankKg- The total substance volume in equipment bank in kg- Returns:
- This builder for method chaining
-
setBankTco2e
Set the bank tCO2e value.- Parameters:
bankTco2e- The total GHG potential of substance in equipment bank in tCO2e- Returns:
- This builder for method chaining
-
setBankChangeKg
Set the bank change kg value.- Parameters:
bankChangeKg- The change in substance bank from previous year in kg- Returns:
- This builder for method chaining
-
setBankChangeTco2e
Set the bank change tCO2e value.- Parameters:
bankChangeTco2e- The change in GHG potential of substance bank from previous year in tCO2e- Returns:
- This builder for method chaining
-
getApplication
Get the application value.- Returns:
- The application value
-
getSubstance
Get the substance value.- Returns:
- The substance value
-
getYear
public int getYear()Get the year value.- Returns:
- The year value
-
getScenarioName
Get the scenario name value.- Returns:
- The scenario name value
-
getTrialNumber
public int getTrialNumber()Get the trial number value.- Returns:
- The trial number value
-
getDomesticValue
Get the domestic value.- Returns:
- The domestic value
-
getImportValue
Get the import value.- Returns:
- The import value
-
getRecycleValue
Get the recycle value.- Returns:
- The recycle value
-
getDomesticConsumptionValue
Get the domestic consumption value.- Returns:
- The domestic consumption value
-
getImportConsumptionValue
Get the import consumption value.- Returns:
- The import consumption value
-
getRecycleConsumptionValue
Get the recycle consumption value.- Returns:
- The recycle consumption value
-
getPopulationValue
Get the population value.- Returns:
- The population value
-
getPopulationNew
Get the population new value.- Returns:
- The population new value
-
getRechargeEmissions
Get the recharge emissions value.- Returns:
- The recharge emissions value
-
getEolEmissions
Get the end-of-life emissions value.- Returns:
- The end-of-life emissions value
-
getInitialChargeEmissions
Get the initial charge emissions value.- Returns:
- The initial charge emissions value
-
getEnergyConsumption
Get the energy consumption value.- Returns:
- The energy consumption value
-
getExportValue
Get the export value.- Returns:
- The export value
-
getExportConsumptionValue
Get the export consumption value.- Returns:
- The export consumption value
-
getTradeSupplement
Get the trade supplement data.- Returns:
- The trade supplement data
-
getBankKg
Get the bank kg value.- Returns:
- The bank kg value
-
getBankTco2e
Get the bank tCO2e value.- Returns:
- The bank tCO2e value
-
getBankChangeKg
Get the bank change kg value.- Returns:
- The bank change kg value
-
getBankChangeTco2e
Get the bank change tCO2e value.- Returns:
- The bank change tCO2e value
-
build
Check that the builder is complete and create a new result.- Returns:
- The result built from the values provided to this builder
- Throws:
IllegalStateException- if any required field is missing
-