com.ibm.commerce.marketing.promotion.dependency

Interface Rounding



  • public interface Rounding
    Rounding interface should be implemented by classes which round the price in a specified currency and store.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void round(java.math.BigDecimal[] a, java.lang.String currency)
      Rounds a BigDecimal array using a customized algorithm.
      java.math.BigDecimal round(java.math.BigDecimal fromAmount, java.lang.String currency)
      Rounds a monetary value in the specified currency.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • round

        java.math.BigDecimal round(java.math.BigDecimal fromAmount,
                                   java.lang.String currency)
        Rounds a monetary value in the specified currency.
        Parameters:
        fromAmount - java.math.BigDecimal
        currency - java.lang.String
        Returns:
        the rounded unitAmount java.math.BigDecimal
      • round

        void round(java.math.BigDecimal[] a,
                   java.lang.String currency)
        Rounds a BigDecimal array using a customized algorithm. If there is no customized algorithm provided, this should return the rounded value for each object inside the array.
        Parameters:
        a - Array of the BigDecimal values
        currency - java.lang.String