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

Public Member Functions

 ReportRow (int order, String name, boolean sum, String group)
 
 ReportRow (int order, String name, String regexp[], ReportSumType sumType, boolean negate)
 
int getOrder ()
 
String getName ()
 
String[] getRegexp ()
 
ReportSumType getSumType ()
 
boolean isNegate ()
 
boolean isSum ()
 
String getGroup ()
 
boolean check (RegisterEntry e)
 
int compareTo (ReportRow o)
 
int hashCode ()
 

Detailed Description

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

Definition at line 30 of file ReportRow.java.

Constructor & Destructor Documentation

◆ ReportRow() [1/2]

org.turro.financials.report.ReportRow.ReportRow ( int  order,
String  name,
boolean  sum,
String  group 
)

Definition at line 37 of file ReportRow.java.

37  {
38  this.order = order;
39  this.name = name;
40  this.regexp = null;
41  this.sum = sum;
42  this.group = group;
43  this.sumType = null;
44  this.negate = false;
45  }

◆ ReportRow() [2/2]

org.turro.financials.report.ReportRow.ReportRow ( int  order,
String  name,
String  regexp[],
ReportSumType  sumType,
boolean  negate 
)

Definition at line 47 of file ReportRow.java.

47  {
48  this.order = order;
49  this.name = name;
50  this.regexp = regexp;
51  this.sum = false;
52  this.group = null;
53  this.sumType = sumType;
54  this.negate = negate;
55  }

Member Function Documentation

◆ check()

boolean org.turro.financials.report.ReportRow.check ( RegisterEntry  e)

Definition at line 85 of file ReportRow.java.

85  {
86  if(isSum()) return true;
87  for(String rg : regexp) {
88  if(e.getAccount().getId().matches(rg)) {
89  return true;
90  }
91  }
92  return false;
93  }
Here is the call graph for this function:

◆ compareTo()

int org.turro.financials.report.ReportRow.compareTo ( ReportRow  o)

Definition at line 96 of file ReportRow.java.

96  {
97  int result = CompareUtil.compare(order, o.getOrder());
98  if(result == 0) {
99  result = CompareUtil.compare(name, o.getName());
100  }
101  return result;
102  }
Here is the call graph for this function:

◆ getGroup()

String org.turro.financials.report.ReportRow.getGroup ( )

Definition at line 81 of file ReportRow.java.

81  {
82  return Strings.isBlank(group) ? "default" : group;
83  }

◆ getName()

String org.turro.financials.report.ReportRow.getName ( )

Definition at line 61 of file ReportRow.java.

61  {
62  return name;
63  }
Here is the caller graph for this function:

◆ getOrder()

int org.turro.financials.report.ReportRow.getOrder ( )

Definition at line 57 of file ReportRow.java.

57  {
58  return order;
59  }
Here is the caller graph for this function:

◆ getRegexp()

String [] org.turro.financials.report.ReportRow.getRegexp ( )

Definition at line 65 of file ReportRow.java.

65  {
66  return regexp;
67  }

◆ getSumType()

ReportSumType org.turro.financials.report.ReportRow.getSumType ( )

Definition at line 69 of file ReportRow.java.

69  {
70  return sumType;
71  }

◆ hashCode()

int org.turro.financials.report.ReportRow.hashCode ( )

Definition at line 105 of file ReportRow.java.

105  {
106  return Objects.hash(order, name, regexp, sumType);
107  }

◆ isNegate()

boolean org.turro.financials.report.ReportRow.isNegate ( )

Definition at line 73 of file ReportRow.java.

73  {
74  return negate;
75  }
Here is the caller graph for this function:

◆ isSum()

boolean org.turro.financials.report.ReportRow.isSum ( )

Definition at line 77 of file ReportRow.java.

77  {
78  return sum;
79  }
Here is the caller graph for this function:

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