org.apache.lucene.document
Enum DateTools.Resolution

java.lang.Object
  extended by java.lang.Enum<DateTools.Resolution>
      extended by 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.


Enum Constant Summary
DAY
           
HOUR
           
MILLISECOND
           
MINUTE
           
MONTH
           
SECOND
           
YEAR
           
 
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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
Method Detail

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>