Enum TimeUnits
- java.lang.Object
- 
- java.lang.Enum<TimeUnits>
- 
- com.inductiveautomation.ignition.common.util.TimeUnits
 
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Dateafter(java.util.Date date, int amount)java.util.Datebefore(java.util.Date date, int amount)static doublefromMillis(long millis, TimeUnits destUnits)intgetCalendarField()longgetMilliMultiplier()static longtoMillis(java.lang.Double time, TimeUnits units)java.lang.StringtoString(java.util.Locale locale)static TimeUnitsvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TimeUnits[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
MSpublic static final TimeUnits MS 
 - 
SECpublic static final TimeUnits SEC 
 - 
MINpublic static final TimeUnits MIN 
 - 
HOURpublic static final TimeUnits HOUR 
 - 
DAYpublic static final TimeUnits DAY 
 - 
WEEKpublic static final TimeUnits WEEK 
 - 
MONTHpublic static final TimeUnits MONTH 
 - 
YEARpublic static final TimeUnits YEAR 
 
- 
 - 
Method Detail- 
valuespublic static TimeUnits[] 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 (TimeUnits c : TimeUnits.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static TimeUnits 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
 
 - 
getMilliMultiplierpublic long getMilliMultiplier() 
 - 
toMillispublic static long toMillis(java.lang.Double time, TimeUnits units)
 - 
fromMillispublic static double fromMillis(long millis, TimeUnits destUnits)
 - 
getCalendarFieldpublic int getCalendarField() 
 - 
beforepublic java.util.Date before(java.util.Date date, int amount)
 - 
afterpublic java.util.Date after(java.util.Date date, int amount)
 
- 
 
-