Package org.opennms.netmgt.statsd
Enum RelativeTime
- java.lang.Object
-
- java.lang.Enum<RelativeTime>
-
- org.opennms.netmgt.statsd.RelativeTime
-
- All Implemented Interfaces:
Serializable
,Comparable<RelativeTime>
public enum RelativeTime extends Enum<RelativeTime>
RelativeTime class.
- Version:
- $Id: $
- Author:
- DJ Gregor
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LASTHOUR
LASTSEVENDAYS
LASTTHIRTYONEDAYS
SLIDING4HOURS
SLIDING8HOURS
SLIDINGDAY
SLIDINGHOUR
THISYEAR
TODAY
YESTERDAY
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected long
getCurrentTime()
getCurrentTimeabstract Date
getEnd()
getEndabstract Date
getStart()
getStartprotected Date
getStartDate(int offset)
getStartDateprotected Date
getStartOfToday()
getStartOfTodayTimeKeeper
getTimeKeeper()
getTimeKeeperprotected TimeZone
getTimeZone()
protected TimeKeeper
myTimeKeeper()
void
setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeperstatic RelativeTime
valueOf(String name)
Returns the enum constant of this type with the specified name.static RelativeTime[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
THISYEAR
public static final RelativeTime THISYEAR
-
LASTTHIRTYONEDAYS
public static final RelativeTime LASTTHIRTYONEDAYS
-
LASTSEVENDAYS
public static final RelativeTime LASTSEVENDAYS
-
YESTERDAY
public static final RelativeTime YESTERDAY
-
LASTHOUR
public static final RelativeTime LASTHOUR
-
SLIDINGHOUR
public static final RelativeTime SLIDINGHOUR
-
SLIDING4HOURS
public static final RelativeTime SLIDING4HOURS
-
SLIDING8HOURS
public static final RelativeTime SLIDING8HOURS
-
SLIDINGDAY
public static final RelativeTime SLIDINGDAY
-
TODAY
public static final RelativeTime TODAY
-
-
Method Detail
-
values
public static RelativeTime[] 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 (RelativeTime c : RelativeTime.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RelativeTime valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getStartDate
protected Date getStartDate(int offset)
getStartDate
- Parameters:
offset
- a int.- Returns:
- a
Date
object.
-
getTimeKeeper
public TimeKeeper getTimeKeeper()
getTimeKeeper
- Returns:
- a
TimeKeeper
object.
-
setTimeKeeper
public void setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
- Parameters:
timeKeeper
- aTimeKeeper
object.
-
getCurrentTime
protected long getCurrentTime()
getCurrentTime
- Returns:
- a long.
-
getTimeZone
protected TimeZone getTimeZone()
-
myTimeKeeper
protected TimeKeeper myTimeKeeper()
-
-