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

java.lang.Object
  extended by org.apache.lucene.queryParser.standard.config.NumericConfig

public class NumericConfig
extends Object

This class holds the configuration used to parse numeric queries and create NumericRangeQuerys.

See Also:
NumericRangeQuery, NumberFormat

Constructor Summary
NumericConfig(int precisionStep, NumberFormat format, 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
 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(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,
                     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 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(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


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