Package org.apache.lucene.document
Enum DateTools.Resolution
- All Implemented Interfaces:
Serializable
,Comparable<DateTools.Resolution>
- Enclosing class:
DateTools
Specifies the time granularity.
-
Enum Constant Summary
Enum ConstantDescriptionLimit a date's resolution to day granularity.Limit a date's resolution to hour granularity.Limit a date's resolution to millisecond granularity.Limit a date's resolution to minute granularity.Limit a date's resolution to month granularity.Limit a date's resolution to second granularity.Limit a date's resolution to year granularity. -
Method Summary
Modifier and TypeMethodDescriptiontoString()
this method returns the name of the resolution in lowercase (for backwards compatibility)static DateTools.Resolution
Returns the enum constant of this type with the specified name.static DateTools.Resolution[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
YEAR
Limit a date's resolution to year granularity. -
MONTH
Limit a date's resolution to month granularity. -
DAY
Limit a date's resolution to day granularity. -
HOUR
Limit a date's resolution to hour granularity. -
MINUTE
Limit a date's resolution to minute granularity. -
SECOND
Limit a date's resolution to second granularity. -
MILLISECOND
Limit a date's resolution to millisecond granularity.
-
-
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
-
toString
this method returns the name of the resolution in lowercase (for backwards compatibility)- Overrides:
toString
in classEnum<DateTools.Resolution>
-