public enum TimeMacro extends Enum<TimeMacro>
Time macros are used as substitute for the actual date values
Modifier and Type | Method and Description |
---|---|
static TimeMacro |
forName(String name)
Get the time macro for the given name.
|
org.joda.time.DateTime |
getDateTime(org.joda.time.DateTime dateTime,
TimeGrain timeGrain)
Calculate the macro-adjusted DateTime under the TimeGrain.
|
String |
getName() |
String |
toString() |
static TimeMacro |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimeMacro[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeMacro CURRENT
public static final TimeMacro NEXT
public static TimeMacro[] values()
for (TimeMacro c : TimeMacro.values()) System.out.println(c);
public static TimeMacro 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 String getName()
public static TimeMacro forName(String name)
name
- Name to find the time macro forpublic org.joda.time.DateTime getDateTime(org.joda.time.DateTime dateTime, TimeGrain timeGrain)
dateTime
- DateTime to adjusttimeGrain
- TimeGrain to adjust the DateTime forCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.