public class CarbonUnit extends ProcessUnit<CarbonUnit.Element> implements SpeciesNameProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
CarbonUnit.CarbonUnitStatus |
static class |
CarbonUnit.Element |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AllSpecies |
protected java.lang.String |
samplingUnitID |
| Modifier | Constructor and Description |
|---|---|
protected |
CarbonUnit(int dateIndex,
java.lang.String samplingUnitID,
CarbonUnitFeature carbonUnitFeature,
AmountMap<CarbonUnit.Element> initialAmounts,
java.lang.String speciesName)
General constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
actualizeCarbon(CATCompartmentManager compartmentManager)
This method actualizes the carbon content of this carbon unit.
|
protected void |
addProcessUnit(ProcessUnit<CarbonUnit.Element> unit) |
protected void |
addStatus(CarbonUnit.CarbonUnitStatus currentStatus) |
boolean |
equals(java.lang.Object obj)
A carbon unit object is considered to be equal if it has the same creation date and the same carbon unit features.
|
protected CarbonUnitFeature |
getCarbonUnitFeature() |
protected int |
getCreationDate()
This method returns the creation date of the product
|
double[] |
getCurrentCarbonArray()
This method returns an array that contains the current carbon (tC) or null if the carbon unit has not been actualized.
|
int |
getIndexInTimeScale()
This method returns the index on the time scale at which the product has been created.
|
double |
getInitialCarbon()
This method returns the carbon (tC) at the creation date.
|
double |
getIntegratedCarbon(CATExponentialFunction decayFunction,
MonteCarloSimulationCompliantObject subject)
This method calculates the average carbon by integrating the carbon contained in
this product over its lifetime.
|
protected CarbonUnit.CarbonUnitStatus |
getLastStatus() |
double[] |
getReleasedCarbonArray()
This method returns the released carbon along in time given the product has been actualized.
|
java.lang.String |
getSpeciesName()
This method returns the species name of this tree.
|
protected CATTimeTable |
getTimeTable() |
double |
getTotalNonRenewableCarbonEmissionsMgCO2Eq()
This method returns the emissions in Mg of CO2 Eq.
|
protected boolean |
isActualized() |
protected void |
setTimeTable(CATTimeTable timeTable) |
java.lang.String |
toString() |
getAmountMappublic static final java.lang.String AllSpecies
protected final java.lang.String samplingUnitID
protected CarbonUnit(int dateIndex,
java.lang.String samplingUnitID,
CarbonUnitFeature carbonUnitFeature,
AmountMap<CarbonUnit.Element> initialAmounts,
java.lang.String speciesName)
dateIndex - the creation date index of the time scalesamplingUnitID - the id of the sample unitcarbonUnitFeature - a CarbonUnitFeature instanceinitialAmounts - a map that contains the amount of each element to be processedspeciesName - the name of the speciesprotected void addProcessUnit(ProcessUnit<CarbonUnit.Element> unit)
addProcessUnit in class ProcessUnit<CarbonUnit.Element>protected boolean isActualized()
public java.lang.String getSpeciesName()
SpeciesNameProvidergetSpeciesName in interface SpeciesNameProviderprotected int getCreationDate()
protected void setTimeTable(CATTimeTable timeTable)
protected CATTimeTable getTimeTable()
protected CarbonUnitFeature getCarbonUnitFeature()
public double getInitialCarbon()
public double[] getCurrentCarbonArray()
public double getIntegratedCarbon(CATExponentialFunction decayFunction, MonteCarloSimulationCompliantObject subject)
protected void actualizeCarbon(CATCompartmentManager compartmentManager) throws java.lang.Exception
compartmentManager - a CATCompartmentManager instancejava.lang.Exceptionpublic double[] getReleasedCarbonArray()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectprotected CarbonUnit.CarbonUnitStatus getLastStatus()
protected void addStatus(CarbonUnit.CarbonUnitStatus currentStatus)
public double getTotalNonRenewableCarbonEmissionsMgCO2Eq()
public int getIndexInTimeScale()