Package com.ethlo.time
Enum Class Field
- All Implemented Interfaces:
Serializable
,Comparable<Field>
,Constable
Enumeration of the fields that makes up the date/date-time
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
static Field
of
(TemporalField temporalField) static Field
Returns the enum constant of this class with the specified name.static Field
Returns the enum constant of this class with the specified name.static Field[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
YEAR
Year -
MONTH
Month of year -
DAY
Day of month -
HOUR
Hour of day -
MINUTE
Minute of hour -
SECOND
Second of minute -
NANO
Nanos -
ZONE_OFFSET
Timezone offset
-
-
Field Details
-
requiredLength
private final int requiredLength
-
-
Constructor Details
-
Field
private Field(int requiredLength)
-
-
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
-
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:
type
- 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
-
of
-
getRequiredLength
public int getRequiredLength()
-