19 package org.turro.financials.report;
21 import java.util.Objects;
22 import org.turro.string.Strings;
23 import org.turro.financials.entity.RegisterEntry;
24 import org.turro.util.CompareUtil;
30 public class ReportRow implements Comparable<ReportRow> {
32 private final int order;
33 private final String name, group, regexp[];
35 private final boolean sum, negate;
37 public ReportRow(
int order, String name,
boolean sum, String group) {
53 this.sumType = sumType;
82 return Strings.isBlank(group) ?
"default" : group;
86 if(
isSum())
return true;
87 for(String rg : regexp) {
97 int result = CompareUtil.compare(order, o.
getOrder());
99 result = CompareUtil.compare(name, o.
getName());
106 return Objects.hash(order, name, regexp, sumType);
ReportRow(int order, String name, boolean sum, String group)
ReportRow(int order, String name, String regexp[], ReportSumType sumType, boolean negate)
ReportSumType getSumType()
boolean check(RegisterEntry e)
int compareTo(ReportRow o)