Class NoOpCurrencyConversionService
java.lang.Object
com.broadleafcommerce.pricing.service.NoOpCurrencyConversionService
- All Implemented Interfaces:
 CurrencyConversionService
Implementation of 
CurrencyConversionService that does nothing
 it always returns false for canCovert(CurrencyUnit, CurrencyUnit) and errors if convert
 is called.- Author:
 - Brian Polster (bpolster)
 - See Also:
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleancanCovert(javax.money.CurrencyUnit from, javax.money.CurrencyUnit to) Always returns falseprotected booleanjavax.money.MonetaryAmountconvert(javax.money.MonetaryAmount fromAmount, javax.money.CurrencyUnit toCurrency) Always throwsUnsupportedOperationException.booleaninthashCode()toString() 
- 
Constructor Details
- 
NoOpCurrencyConversionService
public NoOpCurrencyConversionService() 
 - 
 - 
Method Details
- 
canCovert
public boolean canCovert(javax.money.CurrencyUnit from, javax.money.CurrencyUnit to) Always returns false- Specified by:
 canCovertin interfaceCurrencyConversionService- Parameters:
 from- The currency to convert from.to- The currency to convert to.- Returns:
 
 - 
convert
public javax.money.MonetaryAmount convert(javax.money.MonetaryAmount fromAmount, javax.money.CurrencyUnit toCurrency) Always throwsUnsupportedOperationException. Callers should call canConvert prior to calling the convert operation which in the case of this provider will always return false.- Specified by:
 convertin interfaceCurrencyConversionService- Parameters:
 fromAmount-toCurrency-- Returns:
 
 - 
equals
 - 
canEqual
 - 
hashCode
public int hashCode() - 
toString
 
 -