Class PowerToEnergyCalculation
java.lang.Object
energy.eddie.core.converters.calculations.PowerToEnergyCalculation
- All Implemented Interfaces:
MeasurementCalculation
@ConditionalOnProperty(prefix="eddie.converters",
name="energy",
havingValue="true")
@Component
public class PowerToEnergyCalculation
extends Object
implements MeasurementCalculation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(BigDecimal value, String resolution, BigDecimal scale) Converts energy and hours to power.booleanisTargetUnit(energy.eddie.cim.v0_82.vhd.UnitOfMeasureTypeList unit) scaledUnit(energy.eddie.cim.v0_82.vhd.UnitOfMeasureTypeList unit)
-
Constructor Details
-
PowerToEnergyCalculation
public PowerToEnergyCalculation()
-
-
Method Details
-
convert
Converts energy and hours to power. For more information see this- Specified by:
convertin interfaceMeasurementCalculation- Parameters:
value- the powerresolution- used to get the hoursscale- the scale that should be used for the calculation- Returns:
- the energy for a resolution
-
scaledUnit
public ScaledUnit scaledUnit(energy.eddie.cim.v0_82.vhd.UnitOfMeasureTypeList unit) throws UnsupportedUnitException - Specified by:
scaledUnitin interfaceMeasurementCalculation- Throws:
UnsupportedUnitException
-
isTargetUnit
public boolean isTargetUnit(energy.eddie.cim.v0_82.vhd.UnitOfMeasureTypeList unit) - Specified by:
isTargetUnitin interfaceMeasurementCalculation
-