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

Public Member Functions

ValueItem getItem (String major)
 
TreeSet< ValueItemgetSales ()
 
TreeSet< ValueItemgetExpenses ()
 
double getSalesAmount ()
 
double getExpensesAmount ()
 

Detailed Description

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

Definition at line 27 of file ValuesSet.java.

Member Function Documentation

◆ getExpenses()

TreeSet<ValueItem> org.turro.financials.operating.ValuesSet.getExpenses ( )

Definition at line 50 of file ValuesSet.java.

50  {
51  TreeSet<ValueItem> sub = new TreeSet<>();
52  for(ValueItem vi : this) {
53  if(vi.getMajor().startsWith("6")) {
54  sub.add(vi);
55  }
56  }
57  return sub;
58  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExpensesAmount()

double org.turro.financials.operating.ValuesSet.getExpensesAmount ( )

Definition at line 68 of file ValuesSet.java.

68  {
69  double amount = 0;
70  for(ValueItem vi : getExpenses()) {
71  amount += vi.getValue();
72  }
73  return amount;
74  }
TreeSet< ValueItem > getExpenses()
Definition: ValuesSet.java:50
Here is the call graph for this function:

◆ getItem()

ValueItem org.turro.financials.operating.ValuesSet.getItem ( String  major)

Definition at line 29 of file ValuesSet.java.

29  {
30  ValueItem vi = ceiling(new ValueItem(major));
31  if(vi != null && vi.getMajor().equals(major)) {
32  return vi;
33  } else {
34  vi = new ValueItem(major);
35  add(vi);
36  return vi;
37  }
38  }
Here is the call graph for this function:

◆ getSales()

TreeSet<ValueItem> org.turro.financials.operating.ValuesSet.getSales ( )

Definition at line 40 of file ValuesSet.java.

40  {
41  TreeSet<ValueItem> sub = new TreeSet<>();
42  for(ValueItem vi : this) {
43  if(vi.getMajor().startsWith("7")) {
44  sub.add(vi);
45  }
46  }
47  return sub;
48  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSalesAmount()

double org.turro.financials.operating.ValuesSet.getSalesAmount ( )

Definition at line 60 of file ValuesSet.java.

60  {
61  double amount = 0;
62  for(ValueItem vi : getSales()) {
63  amount += vi.getValue();
64  }
65  return amount;
66  }
Here is the call graph for this function:

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