Package org.opennms.netmgt.jasper.helper
Enum TimeRange
- java.lang.Object
-
- java.lang.Enum<TimeRange>
-
- org.opennms.netmgt.jasper.helper.TimeRange
-
- All Implemented Interfaces:
Serializable
,Comparable<TimeRange>
public enum TimeRange extends Enum<TimeRange>
JasperReports scriptlet to retrieve start and end dates from predefined ranges: last year, last month, this year, this month- Author:
- ronny
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LAST_MONTH
LAST_SEVEN_DAYS
LAST_YEAR
THIS_MONTH
THIS_YEAR
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Date
getEndDate()
static Date
getEndDate(String range)
getEndDateabstract Date
getStartDate()
static Date
getStartDate(String range)
getStartDatestatic TimeRange
valueOf(String name)
Returns the enum constant of this type with the specified name.static TimeRange[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static TimeRange[] 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 (TimeRange c : TimeRange.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TimeRange 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
-
getEndDate
public Date getEndDate()
-
getStartDate
public abstract Date getStartDate()
-
-