Package com.ethlo.time
Enum Field
- All Implemented Interfaces:
Serializable
,Comparable<Field>
Enumeration of the fields that makes up the date/date-time
-
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 type with the specified name.static Field
Returns the enum constant of this type with the specified name.static Field[]
values()
Returns an array containing the constants of this enum type, 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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
valueOf
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:
type
- 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
-
of
-
getRequiredLength
public int getRequiredLength()
-