Enum ETimeScale
- java.lang.Object
-
- java.lang.Enum<ETimeScale>
-
- de.xima.fc.gui.bean.statistics.model.ETimeScale
-
- All Implemented Interfaces:
Serializable
,Comparable<ETimeScale>
public enum ETimeScale extends Enum<ETimeScale>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<Integer,org.apache.commons.lang3.tuple.Pair<Calendar,Calendar>>
getCalendar()
Get the function to create a pair of calendars for the timescale.String
getI18nKey()
Get the i18n key of the timescale.String
getI18nPatternKey()
Get the i18n key of the pattern used for the x-axis.String
getI18nSheetKey()
Get the i18n key of the excel sheet name.int
getScaleField()
Get the corresponding field of theCalendar
.Function<org.apache.commons.lang3.tuple.Pair<Calendar,Calendar>,Integer>
ticks()
Get the function to calculate the ticks of the timescale.static ETimeScale
valueOf(String name)
Returns the enum constant of this type with the specified name.static ETimeScale[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DAY
public static final ETimeScale DAY
-
WEEK
public static final ETimeScale WEEK
-
MONTH
public static final ETimeScale MONTH
-
YEAR
public static final ETimeScale YEAR
-
-
Method Detail
-
values
public static ETimeScale[] 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 (ETimeScale c : ETimeScale.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ETimeScale 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
-
getI18nKey
public String getI18nKey()
Get the i18n key of the timescale.- Returns:
- the i18n key
-
getI18nPatternKey
public String getI18nPatternKey()
Get the i18n key of the pattern used for the x-axis.- Returns:
- the i18n key
-
getI18nSheetKey
public String getI18nSheetKey()
Get the i18n key of the excel sheet name.- Returns:
- the i18n key
-
getScaleField
public int getScaleField()
Get the corresponding field of theCalendar
.- Returns:
- the field
-
getCalendar
public Function<Integer,org.apache.commons.lang3.tuple.Pair<Calendar,Calendar>> getCalendar()
Get the function to create a pair of calendars for the timescale. The Integer parameter is the offset of the timescale. If no offset is used, the current time is the pair.right.- Returns:
- the function
-
ticks
public Function<org.apache.commons.lang3.tuple.Pair<Calendar,Calendar>,Integer> ticks()
Get the function to calculate the ticks of the timescale. The amount of ticks between the start (pair.left) and end (pair.right) in the timescale. TODO: does this make sense for week?- Returns:
- the function
-
-