private BigMoney checkCurrencyEqual ( BigMoneyProvider moneyProvider ) { BigMoney money = of ( moneyProvider ) ; if ( isSameCurrency ( money ) == false ) { throw new CurrencyMismatchException ( getCurrencyUnit ( ) , money . getCurrencyUnit ( ) ) ; } return money ; }
Validates that the currency of this money and the specified money match .