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

Public Member Functions

void addEntry (RegisterEntry entry)
 
Collection< RegisterEntrygetRegisterEntries ()
 
void calculateBalance ()
 
void roundEntries (int fractionDigits)
 

Detailed Description

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

Definition at line 29 of file EntrySet.java.

Member Function Documentation

◆ addEntry()

void org.turro.financials.model.register.EntrySet.addEntry ( RegisterEntry  entry)

Definition at line 31 of file EntrySet.java.

31  {
32  RegisterEntry re = findEqual(entry);
33  if(re != null) {
34  re.setCredit(re.getCredit() + entry.getCredit());
35  re.setDebit(re.getDebit() + entry.getDebit());
36  } else {
37  add(new EntryWrapper(entry));
38  }
39  }
Here is the call graph for this function:

◆ calculateBalance()

void org.turro.financials.model.register.EntrySet.calculateBalance ( )

Definition at line 51 of file EntrySet.java.

51  {
52  double balance = 0;
53  int count = 0;
54  for(EntryWrapper ew : this) {
55  balance += ew.getSingleBalance();
56  ew.getEntry().setEntryOrder(count++);
57  ew.setBalance(balance);
58  }
59  }
Here is the call graph for this function:

◆ getRegisterEntries()

Collection<RegisterEntry> org.turro.financials.model.register.EntrySet.getRegisterEntries ( )

Definition at line 41 of file EntrySet.java.

41  {
42  ArrayList<RegisterEntry> list = new ArrayList<RegisterEntry>();
43  for(EntryWrapper ew : this) {
44  if(!ew.getEntry().isEmpty()) {
45  list.add(ew.getEntry());
46  }
47  }
48  return list;
49  }
Here is the call graph for this function:

◆ roundEntries()

void org.turro.financials.model.register.EntrySet.roundEntries ( int  fractionDigits)

Definition at line 61 of file EntrySet.java.

61  {
62  for(EntryWrapper ew : this) {
63  ew.getEntry().roundIt(fractionDigits);
64  }
65  }
Here is the call graph for this function:

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