DateTools.Resolution (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.document, class: DateTools, enum: Resolution

Package org.apache.lucene.document

# Enum Class DateTools.Resolution

java.lang.Object
java.lang.Enum<DateTools.Resolution>
org.apache.lucene.document.DateTools.Resolution

All Implemented Interfaces:
  `Serializable`, `Comparable<DateTools.Resolution>`, `Constable`

Enclosing class:
  `DateTools`

public static enum DateTools.Resolution extends Enum<DateTools.Resolution>
Specifies the time granularity.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `DAY`
  Limit a date's resolution to day granularity.
  `HOUR`
  Limit a date's resolution to hour granularity.
  `MILLISECOND`
  Limit a date's resolution to millisecond granularity.
  `MINUTE`
  Limit a date's resolution to minute granularity.
  `MONTH`
  Limit a date's resolution to month granularity.
  `SECOND`
  Limit a date's resolution to second granularity.
  `YEAR`
  Limit a date's resolution to year granularity.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 class with the specified name.
  `static DateTools.Resolution[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### YEAR

    public static final DateTools.Resolution YEAR
    Limit a date's resolution to year granularity.

  - ### MONTH

    public static final DateTools.Resolution MONTH
    Limit a date's resolution to month granularity.

  - ### DAY

    public static final DateTools.Resolution DAY
    Limit a date's resolution to day granularity.

  - ### HOUR

    public static final DateTools.Resolution HOUR
    Limit a date's resolution to hour granularity.

  - ### MINUTE

    public static final DateTools.Resolution MINUTE
    Limit a date's resolution to minute granularity.

  - ### SECOND

    public static final DateTools.Resolution SECOND
    Limit a date's resolution to second granularity.

  - ### MILLISECOND

    public static final DateTools.Resolution MILLISECOND
    Limit a date's resolution to millisecond granularity.

- ## Method Details

  - ### values

    public static DateTools.Resolution[] 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

    public static DateTools.Resolution valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null

  - ### toString

    public String toString()
    this method returns the name of the resolution in lowercase (for backwards compatibility)
    Overrides:
      `toString` in class `Enum<DateTools.Resolution>`