common.math.Percentage.asBigDecimal()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中common.math.Percentage.asBigDecimal()方法的一些代码示例,展示了Percentage.asBigDecimal()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Percentage.asBigDecimal()方法的具体详情如下:
包路径:common.math.Percentage
类名称:Percentage
方法名:asBigDecimal

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);
  }
}

相关文章