org.apache.lucene.queryparser.flexible.standard.config

## Class NumericConfig

- java.lang.Object
- - org.apache.lucene.queryparser.flexible.standard.config.NumericConfig

-     public class NumericConfig
      extends Object

  This class holds the configuration used to parse numeric queries and create `NumericRangeQuery`s.
  See Also:
    `NumericRangeQuery`, `NumberFormat`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NumericConfig(int precisionStep, NumberFormat format, FieldType.NumericType type)` Constructs a `NumericConfig` object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `NumberFormat` | `getNumberFormat()` Returns the `NumberFormat` used to parse a `String` to `Number`
    `int` | `getPrecisionStep()` Returns the precision used to index the numeric values
    `FieldType.NumericType` | `getType()` Returns the numeric type used to index the numeric values
    `void` | `setNumberFormat(NumberFormat format)` Sets the `NumberFormat` used to parse a `String` to `Number`
    `void` | `setPrecisionStep(int precisionStep)` Sets the precision used to index the numeric values
    `void` | `setType(FieldType.NumericType type)` Sets the numeric type used to index the numeric values

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

      `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NumericConfig

          public NumericConfig(int precisionStep,
                       NumberFormat format,
                       FieldType.NumericType type)

      Constructs a `NumericConfig` object.
      Parameters:
        `precisionStep` - the precision used to index the numeric values
        `format` - the `NumberFormat` used to parse a `String` to `Number`
        `type` - the numeric type used to index the numeric values
      See Also:
        `setPrecisionStep(int)`, `setNumberFormat(NumberFormat)`, `setType(org.apache.lucene.document.FieldType.NumericType)`

  - ### Method Detail

    - #### getPrecisionStep

          public int getPrecisionStep()

      Returns the precision used to index the numeric values
      Returns:
        the precision used to index the numeric values
      See Also:
        `NumericRangeQuery.getPrecisionStep()`

    - #### setPrecisionStep

          public void setPrecisionStep(int precisionStep)

      Sets the precision used to index the numeric values
      Parameters:
        `precisionStep` - the precision used to index the numeric values
      See Also:
        `NumericRangeQuery.getPrecisionStep()`

    - #### getNumberFormat

          public NumberFormat getNumberFormat()

      Returns the `NumberFormat` used to parse a `String` to `Number`
      Returns:
        the `NumberFormat` used to parse a `String` to `Number`

    - #### getType

          public FieldType.NumericType getType()

      Returns the numeric type used to index the numeric values
      Returns:
        the numeric type used to index the numeric values

    - #### setType

          public void setType(FieldType.NumericType type)

      Sets the numeric type used to index the numeric values
      Parameters:
        `type` - the numeric type used to index the numeric values

    - #### setNumberFormat

          public void setNumberFormat(NumberFormat format)

      Sets the `NumberFormat` used to parse a `String` to `Number`
      Parameters:
        `format` - the `NumberFormat` used to parse a `String` to `Number`, cannot be `null`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.