if (ph.getTransactionDescriptionMatchGroup() == null)
header.setTransactionDescription(ph.getTransactionDescription());
else
- header.setTransactionDescriptionMatchGroup(ph.getTransactionDescriptionMatchGroup());
+ header.setTransactionDescriptionMatchGroup(
+ ph.getTransactionDescriptionMatchGroup());
if (ph.getTransactionCommentMatchGroup() == null)
header.setTransactionComment(ph.getTransactionComment());
else
header.setTransactionCommentMatchGroup(ph.getTransactionCommentMatchGroup());
- header.setDateDayMatchGroup(ph.getDateDayMatchGroup());
- header.setDateMonthMatchGroup(ph.getDateMonthMatchGroup());
- header.setDateYearMatchGroup(ph.getDateYearMatchGroup());
+ if (ph.getDateDayMatchGroup() == null)
+ header.setDateDay(ph.getDateDay());
+ else
+ header.setDateDayMatchGroup(ph.getDateDayMatchGroup());
+
+ if (ph.getDateMonthMatchGroup() == null)
+ header.setDateMonth(ph.getDateMonth());
+ else
+ header.setDateMonthMatchGroup(ph.getDateMonthMatchGroup());
+
+ if (ph.getDateYearMatchGroup() == null)
+ header.setDateYear(ph.getDateYear());
+ else
+ header.setDateYearMatchGroup(ph.getDateYearMatchGroup());
return header;
}
public void switchToLiteral() {
literalValue = true;
}
+ public String toString() {
+ if (literalValue)
+ if (value == null)
+ return "<null>";
+ else
+ return value.toString();
+ if (matchGroup > 0)
+ return "grp:" + matchGroup;
+ return "<null>";
+ }
}
public static class TYPE {
@Override
public String toString() {
return super.toString() +
- String.format(" name[%s] pat[%s] test[%s]", name, pattern, testText);
+ String.format(" name[%s] pat[%s] test[%s] tran[%s] com[%s]", name, pattern,
+ testText, transactionDescription, transactionComment);
}
public String getTestText() {
return testText;