Class NutritionVolume.RoundedValue
java.lang.Object
com.tccc.kos.ext.freestyle.service.brandset.regulatory.NutritionVolume.RoundedValue
- Enclosing class:
- NutritionVolume
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newRoundedResult
for the specified data.RoundedValue
(RecipeNutritionData data, String units) Create a newRoundedResult
for the specified data and overridden units. -
Method Summary
-
Constructor Details
-
RoundedValue
Create a newRoundedResult
for the specified data.- Parameters:
data
- nutrition meta-data from the brandset
-
RoundedValue
Create a newRoundedResult
for the specified data and overridden units.- Parameters:
data
- nutrition meta-data from the brandsetunits
- override units for this result
-
-
Method Details
-
setUnits
Override the units of this result. -
setValue
Set the display and numeric values. The display value should be formatted correctly for display to a consumer while the numeric value can be used for additional calculations. The display format (significant digits, etc..) is commonly part of the regulatory rules and as a result, is mandatory.- Parameters:
displayValue
- the formatted display valuenumericValue
- the numeric result
-
getType
Return the nutrition type. -
getData
-
getDisplayValue
-
getNumericValue
public double getNumericValue() -
getUnits
-