NumericConfig (Lucene 3.6.2 API)
Keywords: org.apache.lucene.queryParser.standard.config.NumericConfig class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.queryParser.standard.config
Class NumericConfig

    java.lang.Object
      org.apache.lucene.queryParser.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
`NumericConfig(int precisionStep, NumberFormat format, org.apache.lucene.document.NumericField.DataType type)` Constructs a `NumericConfig` object.

Method Summary
`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
`org.apache.lucene.document.NumericField.DataType` | `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(org.apache.lucene.document.NumericField.DataType 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,
                         org.apache.lucene.document.NumericField.DataType 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.NumericField.DataType)`

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 org.apache.lucene.document.NumericField.DataType 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(org.apache.lucene.document.NumericField.DataType 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD