org.xwiki.chart.time
Enum TimePeriodType

java.lang.Object
  extended by java.lang.Enum<TimePeriodType>
      extended by 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 $

Enum Constant Summary
DAY
          A day.
HOUR
          Hour.
MILLISECOND
          Millisecond.
MINUTE
          Minute.
MONTH
          Month.
QUARTER
          Qarter of a year.
SECOND
          Second.
SIMPLE
          A simple (irregular) time period.
WEEK
          Week.
YEAR
          Year.
 
Method Summary
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 name
NullPointerException - 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.


Copyright © 2004–2015 XWiki. All rights reserved.