Package org.opennms.netmgt.statsd
Enum RelativeTime
- java.lang.Object
-
- java.lang.Enum<RelativeTime>
-
- org.opennms.netmgt.statsd.RelativeTime
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RelativeTime>
public enum RelativeTime extends java.lang.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 java.util.Date
getEnd()
getEndabstract java.util.Date
getStart()
getStartprotected java.util.Date
getStartDate(int offset)
getStartDateprotected java.util.Date
getStartOfToday()
getStartOfTodayTimeKeeper
getTimeKeeper()
getTimeKeeperprotected java.util.TimeZone
getTimeZone()
protected TimeKeeper
myTimeKeeper()
void
setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeperstatic RelativeTime
valueOf(java.lang.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(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 namejava.lang.NullPointerException
- if the argument is null
-
getStartDate
protected java.util.Date getStartDate(int offset)
getStartDate
- Parameters:
offset
- a int.- Returns:
- a
Date
object.
-
getStartOfToday
protected java.util.Date getStartOfToday()
getStartOfToday
- Returns:
- a
Date
object.
-
getStart
public abstract java.util.Date getStart()
getStart
- Returns:
- a
Date
object.
-
getEnd
public abstract java.util.Date getEnd()
getEnd
- 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 java.util.TimeZone getTimeZone()
-
myTimeKeeper
protected TimeKeeper myTimeKeeper()
-
-