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 booleancontains(BudgetItem item)Check whether a BudgetItem interval is fully contained in a BudgetPeriod.static intgetBudgetIntervalForPeriodType(PeriodType periodType)DateRangegetDateRange()Return the date range encompassed by the BudgetPeriod.java.lang.StringgetDescription()intgetEndDate()BudgetPeriodgetNextBudgetPeriod()Returns a new BudgetPeriod object representing the budget period following the current one.PeriodTypegetPeriodType()static PeriodTypegetPeriodTypeForBudgetInterval(int interval)Return the PeriodType that corresponds to the given budget item interval.BudgetPeriodgetPreviousBudgetPeriod()Returns a new BudgetPeriod object representing the budget period preceding the current one.intgetStartDate()booleanoverlap(BudgetItem item)Check whether a BudgetItem interval is partially contained in a BudgetPeriod or vice versa.voidsetPeriodType(PeriodType periodType)Set the new PeriodType and recalculate the date range.voidsetStartDate(int date)Set the start date and recalculate the end date.java.lang.StringtoString()
-
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:
toStringin classjava.lang.Object
-
getPeriodTypeForBudgetInterval
Return the PeriodType that corresponds to the given budget item interval.- Parameters:
interval-- Returns:
-
getBudgetIntervalForPeriodType
-