Package org.xwiki.chart.time
Enum TimePeriodType
- java.lang.Object
-
- java.lang.Enum<TimePeriodType>
-
- org.xwiki.chart.time.TimePeriodType
-
- All Implemented Interfaces:
Serializable
,Comparable<TimePeriodType>
public enum TimePeriodType extends Enum<TimePeriodType>
Enumeration of supported time period types.- Since:
- 4.2M1
- Version:
- $Id: 9487da3dfb45cf5e731210d4c0db53da53a7bbbc $
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TimePeriodType
forName(String name)
String
getName()
static TimePeriodType
valueOf(String name)
Returns the enum constant of this type with the specified name.static TimePeriodType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MILLISECOND
public static final TimePeriodType MILLISECOND
Millisecond.
-
SECOND
public static final TimePeriodType SECOND
Second.
-
MINUTE
public static final TimePeriodType MINUTE
Minute.
-
HOUR
public static final TimePeriodType HOUR
Hour.
-
DAY
public static final TimePeriodType DAY
A day.
-
WEEK
public static final TimePeriodType WEEK
Week.
-
MONTH
public static final TimePeriodType MONTH
Month.
-
QUARTER
public static final TimePeriodType QUARTER
Qarter of a year.
-
YEAR
public static final TimePeriodType YEAR
Year.
-
SIMPLE
public static final TimePeriodType SIMPLE
A simple (irregular) time period.
-
-
Method Detail
-
values
public static TimePeriodType[] 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 (TimePeriodType c : TimePeriodType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TimePeriodType 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
-
getName
public String getName()
- Returns:
- the name.
-
forName
public static TimePeriodType forName(String name)
- Parameters:
name
- A plot type.- Returns:
- the axis type corresponding to the name, or
null
.
-
-