Package org.zeroexchange.money.currency

Examples of org.zeroexchange.money.currency.CurrencyManager.writeOn()


        for(PayerData payerData: payersData) {
            ZECurrency payerCurrency = payerData.getCurrency();
            BigDecimal payerAmount = payerData.getAmount();
            CurrencyManager moneyAmountProvider = getCurrencyManager(payerCurrency);
            if(moneyAmountProvider != null) {
                moneyAmountProvider.writeOn(
                        payerData.getAmount().negate(), payerCurrency, payerData.getPayer());
                BigDecimal writeOffAmount = currencyToAmount.get(payerCurrency);
                currencyToAmount.put(payerCurrency,
                        writeOffAmount == null ? payerAmount : writeOffAmount.add(payerAmount));
            }
View Full Code Here


            BigDecimal writeOnValue = entry.getValue().divide(BigDecimal.valueOf(consumers.size()), RoundingMode.HALF_UP);
           
            for(User consumer: consumers) {
                CurrencyManager moneyAmountProvider = getCurrencyManager(currency);
                if(moneyAmountProvider != null) {
                    moneyAmountProvider.writeOn(
                            writeOnValue, currency, consumer);
                }
            }
        }
    }
View Full Code Here

        for(PayerData payerData: usersEfforts) {
            User user =  payerData.getPayer();
            ZECurrency currency = payerData.getCurrency();
            BigDecimal userDebt = payerData.getAmount();
            CurrencyManager currencyManager = getCurrencyManager(currency);
            currencyManager.writeOn(userDebt, currency, user);
        }
    }

    /**
     * {@inheritDoc}
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.