本文整理了Java中common.math.Percentage.asBigDecimal()
方法的一些代码示例,展示了Percentage.asBigDecimal()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Percentage.asBigDecimal()
方法的具体详情如下:
包路径:common.math.Percentage
类名称:Percentage
方法名:asBigDecimal
暂无
代码示例来源:origin: warszawajug/spring-labs
@Override
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session)
throws HibernateException, SQLException {
BIG_DECIMAL.nullSafeSet(st, ((Percentage) value).asBigDecimal(), index, session);
}
}
代码示例来源:origin: warszawajug/spring-labs
public Money calculatePaybackFor(Account account, Purchase purchase) {
return purchase.getAmount().multipliedBy(payback.asBigDecimal(), HALF_EVEN);
}
代码示例来源:origin: warszawajug/spring-labs
public Money calculatePaybackFor(Account account, Purchase purchase) {
// TODO #3 ask the policy if the payback is available; if yes, then return calculated amount; otherwise return zero
return purchase.getAmount().multipliedBy(payback.asBigDecimal(), HALF_EVEN);
}
代码示例来源:origin: warszawajug/spring-labs
public Money calculatePaybackFor(Account account, Purchase purchase) {
return purchase.getAmount().multipliedBy(payback.asBigDecimal(), HALF_EVEN);
}
代码示例来源:origin: warszawajug/spring-labs
public Money calculatePaybackFor(Account account, Purchase purchase) {
return purchase.getAmount().multipliedBy(payback.asBigDecimal(), HALF_EVEN);
}
代码示例来源:origin: warszawajug/spring-labs
private Set<Distribution> distribute(Money amount) {
Set<Distribution> distributions = new HashSet<>(objectives.size());
for (Objective objective : objectives) {
Money distributionAmount = amount.multipliedBy(objective.getAllocation().asBigDecimal(), HALF_EVEN);
objective.credit(distributionAmount);
distributions.add(new Distribution(objective.getName(), distributionAmount,
objective.getAllocation(), objective.getSavings()));
}
return distributions;
}
代码示例来源:origin: warszawajug/spring-labs
private Set<Distribution> distribute(Money amount) {
Set<Distribution> distributions = new HashSet<>(objectives.size());
for (Objective objective : objectives) {
Money distributionAmount = amount.multipliedBy(objective.getAllocation().asBigDecimal(), HALF_EVEN);
objective.credit(distributionAmount);
distributions.add(new Distribution(objective.getName(), distributionAmount,
objective.getAllocation(), objective.getSavings()));
}
return distributions;
}
代码示例来源:origin: warszawajug/spring-labs
private Set<Distribution> distribute(Money amount) {
Set<Distribution> distributions = new HashSet<>(objectives.size());
for (Objective objective : objectives) {
Money distributionAmount = amount.multipliedBy(objective.getAllocation().asBigDecimal(), HALF_EVEN);
objective.credit(distributionAmount);
distributions.add(new Distribution(objective.getName(), distributionAmount,
objective.getAllocation(), objective.getSavings()));
}
return distributions;
}
代码示例来源:origin: warszawajug/spring-labs
private Set<Distribution> distribute(Money amount) {
Set<Distribution> distributions = new HashSet<>(objectives.size());
for (Objective objective : objectives) {
Money distributionAmount = amount.multipliedBy(objective.getAllocation().asBigDecimal(), HALF_EVEN);
objective.credit(distributionAmount);
distributions.add(new Distribution(objective.getName(), distributionAmount,
objective.getAllocation(), objective.getSavings()));
}
return distributions;
}
代码示例来源:origin: warszawajug/spring-labs
private Set<Distribution> distribute(Money amount) {
Set<Distribution> distributions = new HashSet<>(objectives.size());
for (Objective objective : objectives) {
Money distributionAmount = amount.multipliedBy(objective.getAllocation().asBigDecimal(), HALF_EVEN);
objective.credit(distributionAmount);
distributions.add(new Distribution(objective.getName(), distributionAmount,
objective.getAllocation(), objective.getSavings()));
}
return distributions;
}
代码示例来源:origin: warszawajug/spring-labs
private Set<Distribution> distribute(Money amount) {
Set<Distribution> distributions = new HashSet<>(objectives.size());
for (Objective objective : objectives) {
Money distributionAmount = amount.multipliedBy(objective.getAllocation().asBigDecimal(), HALF_EVEN);
objective.credit(distributionAmount);
distributions.add(new Distribution(objective.getName(), distributionAmount,
objective.getAllocation(), objective.getSavings()));
}
return distributions;
}
代码示例来源:origin: warszawajug/spring-labs
private Set<Distribution> distribute(Money amount) {
Set<Distribution> distributions = new HashSet<>(objectives.size());
for (Objective objective : objectives) {
Money distributionAmount = amount.multipliedBy(objective.getAllocation().asBigDecimal(), HALF_EVEN);
objective.credit(distributionAmount);
distributions.add(new Distribution(objective.getName(), distributionAmount,
objective.getAllocation(), objective.getSavings()));
}
return distributions;
}
代码示例来源:origin: warszawajug/spring-labs
public Money calculatePaybackFor(Account account, Purchase purchase) {
if (paybackPolicy.isEligible(account, purchase)) {
return purchase.getAmount().multipliedBy(payback.asBigDecimal(), HALF_EVEN);
} else {
return Money.zero(EUR);
}
}
代码示例来源:origin: warszawajug/spring-labs
public Money calculatePaybackFor(Account account, Purchase purchase) {
if (paybackPolicy.isEligible(account, purchase)) {
return purchase.getAmount().multipliedBy(payback.asBigDecimal(), HALF_EVEN);
} else {
return Money.zero(EUR);
}
}
代码示例来源:origin: warszawajug/spring-labs
public Money calculatePaybackFor(Account account, Purchase purchase) {
if (paybackPolicy.isEligible(account, purchase)) {
return purchase.getAmount().multipliedBy(payback.asBigDecimal(), HALF_EVEN);
} else {
return Money.zero(EUR);
}
}
代码示例来源:origin: warszawajug/spring-labs
public Money calculatePaybackFor(Account account, Purchase purchase) {
if (paybackPolicy.isEligible(account, purchase)) {
return purchase.getAmount().multipliedBy(payback.asBigDecimal(), HALF_EVEN);
} else {
return Money.zero(EUR);
}
}
内容来源于网络,如有侵权,请联系作者删除!