private static DecTax nullDecTax() { DecTax decTax = new DecTax(); decTax.setAmount(BigDecimal.ZERO); decTax.setRate(BigDecimal.ZERO); return decTax; }
private DecTax declaredTax(String taxName) { List<DecTax> declaredTaxes = pd.getDeclaredTaxes(); for (DecTax tax : declaredTaxes) { if (taxName.equals(tax.getTaxName())) { return tax; } } return NULL_DEC_TAX; }