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 LASTHOURLASTSEVENDAYSLASTTHIRTYONEDAYSSLIDING4HOURSSLIDING8HOURSSLIDINGDAYSLIDINGHOURTHISYEARTODAYYESTERDAY
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected longgetCurrentTime()getCurrentTimeabstract java.util.DategetEnd()getEndabstract java.util.DategetStart()getStartprotected java.util.DategetStartDate(int offset)getStartDateprotected java.util.DategetStartOfToday()getStartOfTodayTimeKeepergetTimeKeeper()getTimeKeeperprotected java.util.TimeZonegetTimeZone()protected TimeKeepermyTimeKeeper()voidsetTimeKeeper(TimeKeeper timeKeeper)setTimeKeeperstatic RelativeTimevalueOf(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
Dateobject.
-
getStartOfToday
protected java.util.Date getStartOfToday()
getStartOfToday
- Returns:
- a
Dateobject.
-
getStart
public abstract java.util.Date getStart()
getStart
- Returns:
- a
Dateobject.
-
getEnd
public abstract java.util.Date getEnd()
getEnd
- Returns:
- a
Dateobject.
-
getTimeKeeper
public TimeKeeper getTimeKeeper()
getTimeKeeper
- Returns:
- a
TimeKeeperobject.
-
setTimeKeeper
public void setTimeKeeper(TimeKeeper timeKeeper)
setTimeKeeper
- Parameters:
timeKeeper- aTimeKeeperobject.
-
getCurrentTime
protected long getCurrentTime()
getCurrentTime
- Returns:
- a long.
-
getTimeZone
protected java.util.TimeZone getTimeZone()
-
myTimeKeeper
protected TimeKeeper myTimeKeeper()
-
-