org.broadleafcommerce.core.offer.service.discount.domain
Class AbstractPromotionRounding
java.lang.Object
org.broadleafcommerce.core.offer.service.discount.domain.AbstractPromotionRounding
- All Implemented Interfaces:
- PromotionRounding
- Direct Known Subclasses:
- PromotableCandidateItemOfferImpl, PromotableFulfillmentGroupAdjustmentImpl, PromotableOrderItemPriceDetailAdjustmentImpl
public abstract class AbstractPromotionRounding
- extends Object
- implements PromotionRounding
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
roundOfferValues
protected boolean roundOfferValues
roundingScale
protected int roundingScale
roundingMode
protected RoundingMode roundingMode
AbstractPromotionRounding
public AbstractPromotionRounding()
isRoundOfferValues
public boolean isRoundOfferValues()
- It is sometimes problematic to offer percentage-off offers with regards to rounding. For example,
consider an item that costs 9.99 and has a 50% promotion. To be precise, the offer value is 4.995,
but this may be a strange value to display to the user depending on the currency being used.
- Specified by:
isRoundOfferValues in interface PromotionRounding
setRoundingScale
public void setRoundingScale(int roundingScale)
- Parameters:
roundingScale - - See Also:
isRoundOfferValues()
setRoundingMode
public void setRoundingMode(RoundingMode roundingMode)
- Parameters:
roundingMode - - See Also:
isRoundOfferValues()
getRoundingMode
public RoundingMode getRoundingMode()
- Description copied from interface:
PromotionRounding
- Returns the rounding mode to use for rounding operations.
- Specified by:
getRoundingMode in interface PromotionRounding
- Returns:
getRoundingScale
public int getRoundingScale()
- Description copied from interface:
PromotionRounding
- Returns the scale to use when rounding.
- Specified by:
getRoundingScale in interface PromotionRounding
- Returns:
Copyright © 2013. All Rights Reserved.