Enum PeriodType
- java.lang.Object
-
- java.lang.Enum<PeriodType>
-
- com.infinitekind.moneydance.model.PeriodType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PeriodType>
public enum PeriodType extends java.lang.Enum<PeriodType>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
WEEK
public static final PeriodType WEEK
-
BIWEEK
public static final PeriodType BIWEEK
-
MONTH
public static final PeriodType MONTH
-
YEAR
public static final PeriodType YEAR
-
-
Method Detail
-
values
public static PeriodType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PeriodType c : PeriodType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PeriodType valueOf(java.lang.String name)
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
public static PeriodType[] all()
Returns all PeriodType available. Useful for combo boxes etc...- Returns:
-
filter
public static PeriodType[] filter(PeriodType periodType, PeriodTypeFilter 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
public static PeriodType fromOrder(int periodTypeOrder)
-
-