Class NutritionVolume.RoundedValue

java.lang.Object
com.tccc.kos.ext.freestyle.service.brandset.regulatory.NutritionVolume.RoundedValue
Enclosing class:
NutritionVolume

public static class NutritionVolume.RoundedValue extends Object
  • Constructor Details

    • RoundedValue

      public RoundedValue(RecipeNutritionData data)
      Create a new RoundedResult for the specified data.
      Parameters:
      data - nutrition meta-data from the brandset
    • RoundedValue

      public RoundedValue(RecipeNutritionData data, String units)
      Create a new RoundedResult for the specified data and overridden units.
      Parameters:
      data - nutrition meta-data from the brandset
      units - override units for this result
  • Method Details

    • setUnits

      public void setUnits(String units)
      Override the units of this result.
    • setValue

      public void setValue(String displayValue, double numericValue)
      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 value
      numericValue - the numeric result
    • getType

      public String getType()
      Return the nutrition type.
    • getData

      public RecipeNutritionData getData()
    • getDisplayValue

      public String getDisplayValue()
    • getNumericValue

      public double getNumericValue()
    • getUnits

      public String getUnits()