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

Public Member Functions

boolean add (Amount e)
 
void addAmount (Amount e)
 
double getTaxable ()
 
double getTaxValue ()
 
Amount getAmount (Double tax)
 
double getAmount ()
 
void clearEmpty ()
 

Detailed Description

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

Definition at line 27 of file AmountSet.java.

Member Function Documentation

◆ add()

boolean org.turro.financials.model.AmountSet.add ( Amount  e)

Definition at line 30 of file AmountSet.java.

30  {
31  e.setAmountSet(this);
32  return super.add(e);
33  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addAmount()

void org.turro.financials.model.AmountSet.addAmount ( Amount  e)

Definition at line 35 of file AmountSet.java.

35  {
36  Amount a = getAmount(e.getTax());
37  if(a == null) {
38  add(e);
39  } else {
40  a.addTax(e.getTax(), e.getSubtotal(), e.getDiscount(), e.getRetained());
41  }
42  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearEmpty()

void org.turro.financials.model.AmountSet.clearEmpty ( )

Definition at line 77 of file AmountSet.java.

77  {
78  Iterator<Amount> it = iterator();
79  while(it.hasNext()) {
80  if(it.next().isEmpty()) {
81  it.remove();
82  }
83  }
84  }

◆ getAmount() [1/2]

double org.turro.financials.model.AmountSet.getAmount ( )

Definition at line 69 of file AmountSet.java.

69  {
70  double amount = 0;
71  for(Amount a : this) {
72  amount += a.getAmount();
73  }
74  return amount;
75  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAmount() [2/2]

Amount org.turro.financials.model.AmountSet.getAmount ( Double  tax)

Definition at line 60 of file AmountSet.java.

60  {
61  for(Amount a : this) {
62  if(a.getTax().equals(tax)) {
63  return a;
64  }
65  }
66  return null;
67  }
Here is the call graph for this function:

◆ getTaxable()

double org.turro.financials.model.AmountSet.getTaxable ( )

Definition at line 44 of file AmountSet.java.

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

◆ getTaxValue()

double org.turro.financials.model.AmountSet.getTaxValue ( )

Definition at line 52 of file AmountSet.java.

52  {
53  double amount = 0;
54  for(Amount a : this) {
55  amount += a.getTaxValue();
56  }
57  return amount;
58  }
Here is the call graph for this function:

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