Class BudgetPeriod
java.lang.Object
com.infinitekind.moneydance.model.BudgetPeriod
public class BudgetPeriod
extends java.lang.Object
Represents the date range on which the budget calculations are based upon.
- See Also:
PeriodType
-
Constructor Summary
Constructors Constructor Description BudgetPeriod(int startDate, PeriodType periodType)
BudgetPeriod(java.util.Date startDate, PeriodType periodType)
Deprecated.please use the BudgetPeriod(int startDate, PeriodType periodType) constructor -
Method Summary
Modifier and Type Method Description boolean
contains(BudgetItem item)
Check whether a BudgetItem interval is fully contained in a BudgetPeriod.static int
getBudgetIntervalForPeriodType(PeriodType periodType)
DateRange
getDateRange()
Return the date range encompassed by the BudgetPeriod.java.lang.String
getDescription()
int
getEndDate()
BudgetPeriod
getNextBudgetPeriod()
Returns a new BudgetPeriod object representing the budget period following the current one.PeriodType
getPeriodType()
static PeriodType
getPeriodTypeForBudgetInterval(int interval)
Return the PeriodType that corresponds to the given budget item interval.BudgetPeriod
getPreviousBudgetPeriod()
Returns a new BudgetPeriod object representing the budget period preceding the current one.int
getStartDate()
boolean
overlap(BudgetItem item)
Check whether a BudgetItem interval is partially contained in a BudgetPeriod or vice versa.void
setPeriodType(PeriodType periodType)
Set the new PeriodType and recalculate the date range.void
setStartDate(int date)
Set the start date and recalculate the end date.java.lang.String
toString()
-
Constructor Details
-
BudgetPeriod
Deprecated.please use the BudgetPeriod(int startDate, PeriodType periodType) constructor -
BudgetPeriod
-
-
Method Details
-
setPeriodType
Set the new PeriodType and recalculate the date range.- Parameters:
periodType
-
-
getPeriodType
-
getStartDate
public int getStartDate() -
setStartDate
public void setStartDate(int date)Set the start date and recalculate the end date.- Parameters:
date
-
-
getEndDate
public int getEndDate() -
getDateRange
Return the date range encompassed by the BudgetPeriod.- Returns:
-
getDescription
public java.lang.String getDescription() -
overlap
Check whether a BudgetItem interval is partially contained in a BudgetPeriod or vice versa.- Parameters:
item
-- Returns:
-
contains
Check whether a BudgetItem interval is fully contained in a BudgetPeriod.- Parameters:
item
-- Returns:
-
getPreviousBudgetPeriod
Returns a new BudgetPeriod object representing the budget period preceding the current one.- Returns:
- BudgetPeriod
-
getNextBudgetPeriod
Returns a new BudgetPeriod object representing the budget period following the current one.- Returns:
- Date
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getPeriodTypeForBudgetInterval
Return the PeriodType that corresponds to the given budget item interval.- Parameters:
interval
-- Returns:
-
getBudgetIntervalForPeriodType
-