public static enum DateTime.Granularity extends Enum<DateTime.Granularity>
Enum Constant and Description |
---|
CENTURY
A unit of one century
|
DAY
A unit of one day.
|
HOUR
A unit of one hour.
|
MILLISECOND
A unit of one millisecond.
|
MINUTE
A unit of one minute.
|
MONTH
A unit of one month.
|
SECOND
A unit of one second.
|
WEEK
A unit of one week
|
YEAR
A unit of one year.
|
Modifier and Type | Method and Description |
---|---|
double |
getFactor()
Gets the conversion factor from milliseconds.
|
org.joda.time.DurationFieldType |
getField()
Gets the equivalent Joda-Time field type.
|
static DateTime.Granularity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DateTime.Granularity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateTime.Granularity MILLISECOND
public static final DateTime.Granularity SECOND
public static final DateTime.Granularity MINUTE
public static final DateTime.Granularity HOUR
public static final DateTime.Granularity DAY
public static final DateTime.Granularity WEEK
public static final DateTime.Granularity MONTH
public static final DateTime.Granularity YEAR
public static final DateTime.Granularity CENTURY
public static DateTime.Granularity[] values()
for (DateTime.Granularity c : DateTime.Granularity.values()) System.out.println(c);
public static DateTime.Granularity 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 double getFactor()
public org.joda.time.DurationFieldType getField()
DurationFieldType
for this granularityCopyright © 2016 Actian Corporation. All rights reserved.