Enum PeriodType
java.lang.Object
java.lang.Enum<PeriodType>
com.infinitekind.moneydance.model.PeriodType
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PeriodType>
,java.lang.constant.Constable
public enum PeriodType extends java.lang.Enum<PeriodType>
-
Nested Class Summary
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description int
addPeriodToDate(int date)
Add this period to the given Moneydance integer date and return the result.static PeriodType[]
all()
Returns all PeriodType available.static PeriodType[]
filter(PeriodType periodType, PeriodTypeFilter filter)
Returns the PeriodType objects according to the given periodType and filter.static PeriodType
fromOrder(int periodTypeOrder)
int
getCalendarField()
int
getDaysInPeriodContaining(int date)
int
getFirstDayInPeriod(int date)
Returns the first date in the period that contains the given dateint
getOrder()
int
incrementDateByPeriod(int date, int numPeriods)
Add this period to the given Moneydance integer date and return the result.static PeriodType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PeriodType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCalendarField
public int getCalendarField() -
getOrder
public int getOrder() -
all
Returns all PeriodType available. Useful for combo boxes etc...- Returns:
-
filter
Returns the PeriodType objects according to the given periodType and filter.- Parameters:
periodType
-filter
-- Returns:
-
addPeriodToDate
public int addPeriodToDate(int date)Add this period to the given Moneydance integer date and return the result. -
incrementDateByPeriod
public int incrementDateByPeriod(int date, int numPeriods)Add this period to the given Moneydance integer date and return the result. -
getDaysInPeriodContaining
public int getDaysInPeriodContaining(int date) -
getFirstDayInPeriod
public int getFirstDayInPeriod(int date)Returns the first date in the period that contains the given date -
fromOrder
-