public enum TimeUnit extends Enum<TimeUnit> implements MpxjEnum
Enum Constant and Description |
---|
DAYS
Constant representing Days.
|
ELAPSED_DAYS
Constant representing Elapsed Days.
|
ELAPSED_HOURS
Constant representing Elapsed Hours.
|
ELAPSED_MINUTES
Constant representing Elapsed Minutes.
|
ELAPSED_MONTHS
Constant representing Elapsed Months.
|
ELAPSED_PERCENT
Constant representing Elapsed Percent.
|
ELAPSED_WEEKS
Constant representing Elapsed Weeks.
|
ELAPSED_YEARS
Constant representing Elapsed Years.
|
HOURS
Constant representing Hours.
|
MINUTES
Constant representing Minutes.
|
MONTHS
Constant representing Months.
|
PERCENT
Constant representing Percent.
|
WEEKS
Constant representing Weeks.
|
YEARS
Constant representing Years.
|
Modifier and Type | Method and Description |
---|---|
static TimeUnit |
getInstance(int type)
Retrieve an instance of the enum based on its int value.
|
static TimeUnit |
getInstance(Number type)
Retrieve an instance of the enum based on its int value.
|
String |
getName()
Retrieve the name associated with this enum.
|
int |
getValue()
Accessor method used to retrieve the numeric representation of the enum.
|
boolean |
isElapsed()
Determine if this is an elapsed time unit.
|
String |
toString() |
static TimeUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeUnit MINUTES
public static final TimeUnit HOURS
public static final TimeUnit DAYS
public static final TimeUnit WEEKS
public static final TimeUnit MONTHS
public static final TimeUnit PERCENT
public static final TimeUnit YEARS
public static final TimeUnit ELAPSED_MINUTES
public static final TimeUnit ELAPSED_HOURS
public static final TimeUnit ELAPSED_DAYS
public static final TimeUnit ELAPSED_WEEKS
public static final TimeUnit ELAPSED_MONTHS
public static final TimeUnit ELAPSED_YEARS
public static final TimeUnit ELAPSED_PERCENT
public static TimeUnit[] values()
for (TimeUnit c : TimeUnit.values()) System.out.println(c);
public static TimeUnit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static TimeUnit getInstance(int type)
type
- int typepublic static TimeUnit getInstance(Number type)
type
- int typepublic int getValue()
public String getName()
public boolean isElapsed()
Copyright © 2000–2024 Packwood Software. All rights reserved.