getComputedKJ method
Returns the energy in kJ for that perSize
, direct or computed from kcal.
Implementation
double? getComputedKJ(final PerSize perSize) {
double? result;
result = getValue(Nutrient.energyKJ, perSize);
if (result != null) {
return result;
}
result = getValue(Nutrient.energyKCal, perSize);
if (result != null) {
return NutrimentsHelper.fromKCalToKJ(result);
}
return null;
}