19 package org.turro.financials.model.document;
21 import org.turro.math.Round;
29 private Double perCent, taxable;
30 private int fractionDigits;
33 this.perCent = perCent;
37 public void add(Double taxable) {
38 this.taxable += taxable;
42 return this.perCent.equals(perCent);
46 this.fractionDigits = fractionDigits;
58 return new Round((taxable * (perCent / 100.0))).
decimals(fractionDigits).value();
62 return taxable ==
null || taxable == 0 || taxable.isNaN();
68 hash = 37 * hash + (this.perCent !=
null ? this.perCent.hashCode() : 0);
77 if (getClass() != obj.getClass()) {
81 if (this.perCent != other.perCent && (
this.perCent ==
null || !
this.perCent.equals(other.perCent))) {
89 return perCent.compareTo(o.perCent);
int compareTo(AmountRetained o)
boolean isPerCent(Double perCent)
AmountRetained(Double perCent)
boolean equals(Object obj)
void setFractionDigits(int fractionDigits)
Round decimals(int digits)