18 package org.turro.financials.report;
20 import java.util.Date;
21 import java.util.TreeSet;
22 import org.amic.util.date.CheckDate;
28 public class PeriodSet extends TreeSet<AccountReportPeriod> {
30 private int year = 0, month = 0;
48 CheckDate cd =
new CheckDate(arp.
getYear(), arp.
getMonth(), 1, 0, 0, 0);
49 Date now =
new Date();
50 while(cd.compareMonthYear(now) == -1) {
61 if(year == 0 || month == 0) {
62 CheckDate cd =
new CheckDate();
63 cd.addMonths(-(count/2));
65 month = cd.getMonth();
71 if(c++ > count - 1)
break;
77 CheckDate cd =
new CheckDate(year, month, 1, 0, 0, 0);
80 month = cd.getMonth();
boolean equals(Object obj)
void setItem(AccountReportItem item)
void setValue(double value)
PeriodSet getCurrentPeriod(int count)
void incrementPeriod(int amount)
void fillGapsTillNow(AccountReportItem item)
AccountReportPeriod getPeriod(AccountReportPeriod period)