Package limn.components.date
Enum Class DateField.Granularity
- All Implemented Interfaces:
Serializable,Comparable<DateField.Granularity>,Constable
- Enclosing class:
DateField
How fine a field goes: which segment is its last. A field that starts at the year edits down
to this; one that starts at the hour edits from there down to it, and refuses the three date
levels.
A closed list on purpose. A week, a quarter or a decade would each be a real piece of design — what the segment shows, what a range of them means — and a value in an open set that nobody had designed for would be a field that draws nothing.
A 1.x minor release may add constants to this enum: a switch over it needs a
default branch.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic DateField.GranularityReturns the enum constant of this class with the specified name.static DateField.Granularity[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
YEAR
The year alone. A range of years runs from 1 January to 31 December. -
MONTH
Year and month: a month picker. A range of months runs from the 1st to the last day. -
DAY
A whole date: the default fornew DateField(). -
HOUR
Down to the hour. A range's end is the last minute of its hour. -
MINUTE
Down to the minute: the default forDateField.ofTime(). -
SECOND
Down to the second.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-