Enum LoggingTimeInterval
- java.lang.Object
-
- java.lang.Enum<LoggingTimeInterval>
-
- cern.nxcals.api.backport.domain.core.constants.LoggingTimeInterval
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<LoggingTimeInterval>
public enum LoggingTimeInterval extends java.lang.Enum<LoggingTimeInterval> implements java.io.Serializable
The Enum LoggingTimeInterval is used to represent a time interval
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLabel()
long
getTimeMs()
static java.lang.String
getValues()
java.lang.String
toString()
static LoggingTimeInterval
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LoggingTimeInterval[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SECOND
public static final LoggingTimeInterval SECOND
The duration of 1 second
-
MINUTE
public static final LoggingTimeInterval MINUTE
The duration of 1 minute
-
HOUR
public static final LoggingTimeInterval HOUR
The duration of an hour
-
DAY
public static final LoggingTimeInterval DAY
The duration of a day
-
WEEK
public static final LoggingTimeInterval WEEK
The duration of a week (7 days)
-
MONTH
public static final LoggingTimeInterval MONTH
The duration of 30 days
-
YEAR
public static final LoggingTimeInterval YEAR
The duration of 365 days
-
-
Method Detail
-
values
public static LoggingTimeInterval[] 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 (LoggingTimeInterval c : LoggingTimeInterval.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LoggingTimeInterval 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<LoggingTimeInterval>
-
getValues
public static java.lang.String getValues()
-
getLabel
public java.lang.String getLabel()
-
getTimeMs
public long getTimeMs()
-
-