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

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    BIWEEK  
    MONTH  
    WEEK  
    YEAR  
  • 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 date
    int 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.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static PeriodType[] 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

      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 name
      java.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)