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

Public Member Functions

boolean add (Double perCent, Double taxable, int fractionDigits)
 
AmountRetained getPercent (Double perCent)
 
double getTaxable ()
 
double getRetained ()
 
void clearEmpty ()
 

Detailed Description

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

Definition at line 28 of file AmountRetainedSet.java.

Member Function Documentation

◆ add()

boolean org.turro.financials.model.document.AmountRetainedSet.add ( Double  perCent,
Double  taxable,
int  fractionDigits 
)

Definition at line 30 of file AmountRetainedSet.java.

30  {
31  AmountRetained ar = getPercent(perCent);
32  ar.setFractionDigits(fractionDigits);
33  ar.add(taxable);
34  return super.add(ar);
35  }
Here is the call graph for this function:

◆ clearEmpty()

void org.turro.financials.model.document.AmountRetainedSet.clearEmpty ( )

Definition at line 62 of file AmountRetainedSet.java.

62  {
63  Iterator<AmountRetained> it = iterator();
64  while(it.hasNext()) {
65  if(it.next().isEmpty()) {
66  it.remove();
67  }
68  }
69  }

◆ getPercent()

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

Definition at line 37 of file AmountRetainedSet.java.

37  {
38  for(AmountRetained ar : this) {
39  if(ar.isPerCent(perCent)) {
40  return ar;
41  }
42  }
43  return new AmountRetained(perCent);
44  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRetained()

double org.turro.financials.model.document.AmountRetainedSet.getRetained ( )

Definition at line 54 of file AmountRetainedSet.java.

54  {
55  double amount = 0;
56  for(AmountRetained a : this) {
57  amount += a.getRetained();
58  }
59  return amount;
60  }
Here is the call graph for this function:

◆ getTaxable()

double org.turro.financials.model.document.AmountRetainedSet.getTaxable ( )

Definition at line 46 of file AmountRetainedSet.java.

46  {
47  double amount = 0;
48  for(AmountRetained a : this) {
49  amount += a.getTaxable();
50  }
51  return amount;
52  }
Here is the call graph for this function:

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