org.apache.lucene.document
Enum DateTools.Resolution
java.lang.Object
java.lang.Enum<DateTools.Resolution>
org.apache.lucene.document.DateTools.Resolution
- All Implemented Interfaces:
- Serializable, Comparable<DateTools.Resolution>
- Enclosing class:
- DateTools
public static enum DateTools.Resolution
- extends Enum<DateTools.Resolution>
Specifies the time granularity.
Method Summary |
String |
toString()
this method returns the name of the resolution
in lowercase (for backwards compatibility) |
static DateTools.Resolution |
valueOf(String name)
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're declared. |
YEAR
public static final DateTools.Resolution YEAR
MONTH
public static final DateTools.Resolution MONTH
DAY
public static final DateTools.Resolution DAY
HOUR
public static final DateTools.Resolution HOUR
MINUTE
public static final DateTools.Resolution MINUTE
SECOND
public static final DateTools.Resolution SECOND
MILLISECOND
public static final DateTools.Resolution MILLISECOND
values
public static final DateTools.Resolution[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(DateTools.Resolution c : DateTools.Resolution.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static DateTools.Resolution 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 name
toString
public String toString()
- this method returns the name of the resolution
in lowercase (for backwards compatibility)
- Overrides:
toString
in class Enum<DateTools.Resolution>