List of usage examples for java.math BigDecimal subtract
public BigDecimal subtract(BigDecimal subtrahend)
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getBaitdVar2() { try {/*from www . j av a2s. com*/ BigDecimal res = new BigDecimal(financialRatio.getBaitd().doubleValue()); res = res.divide(financialRatioCompTwo.getBaitd(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getStocksVar1() { try {/* w w w . j a va 2s. c om*/ BigDecimal res = new BigDecimal(financialRatio.getStocks().doubleValue()); res = res.divide(financialRatioCompOne.getStocks(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getStocksVar2() { try {/*w w w . ja va2 s .co m*/ BigDecimal res = new BigDecimal(financialRatio.getStocks().doubleValue()); res = res.divide(financialRatioCompTwo.getStocks(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getMarginVar1() { try {//w ww . ja v a2 s . co m BigDecimal res = new BigDecimal(financialRatio.getMargin().doubleValue()); res = res.divide(financialRatioCompOne.getMargin(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getMarginVar2() { try {/*ww w.j a v a2 s . c om*/ BigDecimal res = new BigDecimal(financialRatio.getMargin().doubleValue()); res = res.divide(financialRatioCompTwo.getMargin(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getCapitalVar1() { try {/* w ww . j a v a2 s . c om*/ BigDecimal res = new BigDecimal(financialRatio.getCapital().doubleValue()); res = res.divide(financialRatioCompOne.getCapital(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getCapitalVar2() { try {// w ww . j a v a2s.co m BigDecimal res = new BigDecimal(financialRatio.getCapital().doubleValue()); res = res.divide(financialRatioCompTwo.getCapital(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getIncomesVar1() { try {/*from w ww . j a v a 2s .c om*/ BigDecimal res = new BigDecimal(financialRatio.getIncomes().doubleValue()); res = res.divide(financialRatioCompOne.getIncomes(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getIncomesVar2() { try {//from w w w.ja v a2s . c om BigDecimal res = new BigDecimal(financialRatio.getIncomes().doubleValue()); res = res.divide(financialRatioCompTwo.getIncomes(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }
From source file:com.autentia.intra.bean.billing.FinancialRatioBean.java
public BigDecimal getNetAssetVar1() { try {//from w w w. j a v a 2 s . c om BigDecimal res = new BigDecimal(financialRatio.getNetAsset().doubleValue()); res = res.divide(financialRatioCompOne.getNetAsset(), 4, RoundingMode.HALF_UP); res = res.subtract(new BigDecimal(1)); return res; } catch (Exception e) { return new BigDecimal(0); } }