19 package org.turro.financials.cart;
21 import org.turro.math.Round;
29 private Double perCent, tax, taxValue, amount, taxable;
32 this.perCent = perCent;
39 public void add(Double taxValue, Double amount, Double taxable) {
40 this.taxValue += taxValue;
41 this.amount += amount;
42 this.taxable += taxable;
46 return this.perCent.equals(perCent);
73 return taxable + taxValue;
77 return amount ==
null || amount == 0 || amount.isNaN();
83 hash = 23 * hash + (this.perCent !=
null ? this.perCent.hashCode() : 0);
92 if (getClass() != obj.getClass()) {
96 if (this.perCent != other.perCent && (
this.perCent ==
null || !
this.perCent.equals(other.perCent))) {
104 return perCent.compareTo(o.perCent);
CartTaxable(Double perCent, Double tax)
boolean equals(Object obj)
void add(Double taxValue, Double amount, Double taxable)
boolean isPerCent(Double perCent)
int compareTo(CartTaxable o)
Round decimals(int digits)