BrightSide Workbench Full Report + Source Code
org.turro.financials.model.document.AmountRetained Class Reference
Inheritance diagram for org.turro.financials.model.document.AmountRetained:
Collaboration diagram for org.turro.financials.model.document.AmountRetained:

Public Member Functions

 AmountRetained (Double perCent)
 
void add (Double taxable)
 
boolean isPerCent (Double perCent)
 
void setFractionDigits (int fractionDigits)
 
Double getRetention ()
 
Double getTaxable ()
 
Double getRetained ()
 
boolean isEmpty ()
 
int hashCode ()
 
boolean equals (Object obj)
 
int compareTo (AmountRetained o)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 27 of file AmountRetained.java.

Constructor & Destructor Documentation

◆ AmountRetained()

org.turro.financials.model.document.AmountRetained.AmountRetained ( Double  perCent)

Definition at line 32 of file AmountRetained.java.

32  {
33  this.perCent = perCent;
34  taxable = 0.0;
35  }
Here is the caller graph for this function:

Member Function Documentation

◆ add()

void org.turro.financials.model.document.AmountRetained.add ( Double  taxable)

Definition at line 37 of file AmountRetained.java.

37  {
38  this.taxable += taxable;
39  }
Here is the caller graph for this function:

◆ compareTo()

int org.turro.financials.model.document.AmountRetained.compareTo ( AmountRetained  o)

Definition at line 88 of file AmountRetained.java.

88  {
89  return perCent.compareTo(o.perCent);
90  }

◆ equals()

boolean org.turro.financials.model.document.AmountRetained.equals ( Object  obj)

Definition at line 73 of file AmountRetained.java.

73  {
74  if (obj == null) {
75  return false;
76  }
77  if (getClass() != obj.getClass()) {
78  return false;
79  }
80  final AmountRetained other = (AmountRetained) obj;
81  if (this.perCent != other.perCent && (this.perCent == null || !this.perCent.equals(other.perCent))) {
82  return false;
83  }
84  return true;
85  }
Here is the call graph for this function:

◆ getRetained()

Double org.turro.financials.model.document.AmountRetained.getRetained ( )

Definition at line 57 of file AmountRetained.java.

57  {
58  return new Round((taxable * (perCent / 100.0))).decimals(fractionDigits).value();
59  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRetention()

Double org.turro.financials.model.document.AmountRetained.getRetention ( )

Definition at line 49 of file AmountRetained.java.

49  {
50  return perCent;
51  }
Here is the caller graph for this function:

◆ getTaxable()

Double org.turro.financials.model.document.AmountRetained.getTaxable ( )

Definition at line 53 of file AmountRetained.java.

53  {
54  return taxable;
55  }
Here is the caller graph for this function:

◆ hashCode()

int org.turro.financials.model.document.AmountRetained.hashCode ( )

Definition at line 66 of file AmountRetained.java.

66  {
67  int hash = 7;
68  hash = 37 * hash + (this.perCent != null ? this.perCent.hashCode() : 0);
69  return hash;
70  }

◆ isEmpty()

boolean org.turro.financials.model.document.AmountRetained.isEmpty ( )

Definition at line 61 of file AmountRetained.java.

61  {
62  return taxable == null || taxable == 0 || taxable.isNaN();
63  }

◆ isPerCent()

boolean org.turro.financials.model.document.AmountRetained.isPerCent ( Double  perCent)

Definition at line 41 of file AmountRetained.java.

41  {
42  return this.perCent.equals(perCent);
43  }
Here is the caller graph for this function:

◆ setFractionDigits()

void org.turro.financials.model.document.AmountRetained.setFractionDigits ( int  fractionDigits)

Definition at line 45 of file AmountRetained.java.

45  {
46  this.fractionDigits = fractionDigits;
47  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: