public long convertFromUsdToUah(long usd) { return BigDecimal.valueOf(usd).multiply(Currency.USD.getSellRate()).longValue(); }
public long convertFromUahToUsd(long uah) { return BigDecimal.valueOf(uah) .divide(Currency.USD.getBuyRate(), RoundingMode.HALF_UP) .longValue(); }