SortedSetSelector.Type (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.search, class: SortedSetSelector, enum: Type

Package org.apache.lucene.search

# Enum Class SortedSetSelector.Type

java.lang.Object
java.lang.Enum<SortedSetSelector.Type>
org.apache.lucene.search.SortedSetSelector.Type

All Implemented Interfaces:
  `Serializable`, `Comparable<SortedSetSelector.Type>`, `Constable`

Enclosing class:
  `SortedSetSelector`

public static enum SortedSetSelector.Type extends Enum<SortedSetSelector.Type>
Type of selection to perform.

Limitations:

- Fields containing `Integer.MAX_VALUE` or more unique values are unsupported.
- Selectors other than (`MIN`) require optional codec support. However several codecs provided by Lucene, including the current default codec, support this.

- ## 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
  `MAX`
  Selects the maximum value in the set
  `MIDDLE_MAX`
  Selects the middle value in the set.
  `MIDDLE_MIN`
  Selects the middle value in the set.
  `MIN`
  Selects the minimum value in the set

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static SortedSetSelector.Type`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static SortedSetSelector.Type[]`
  `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, toString, valueOf`

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

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

- ## Enum Constant Details

  - ### MIN

    public static final SortedSetSelector.Type MIN
    Selects the minimum value in the set

  - ### MAX

    public static final SortedSetSelector.Type MAX
    Selects the maximum value in the set

  - ### MIDDLE_MIN

    public static final SortedSetSelector.Type MIDDLE_MIN
    Selects the middle value in the set.

    If the set has an even number of values, the lower of the middle two is chosen.

  - ### MIDDLE_MAX

    public static final SortedSetSelector.Type MIDDLE_MAX
    Selects the middle value in the set.

    If the set has an even number of values, the higher of the middle two is chosen

- ## Method Details

  - ### values

    public static SortedSetSelector.Type[] 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 SortedSetSelector.Type 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