Class NumberDateFormat
- java.lang.Object
-
- java.text.Format
-
- java.text.NumberFormat
-
- org.apache.lucene.queryparser.flexible.standard.config.NumberDateFormat
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class NumberDateFormat extends java.text.NumberFormat
ThisFormat
parsesLong
into date strings and vice-versa. It uses the givenDateFormat
to parse and format dates, but before, it convertsLong
toDate
objects or vice-versa.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NumberDateFormat(java.text.DateFormat dateFormat)
Constructs aNumberDateFormat
object using the givenDateFormat
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuffer
format(double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
java.lang.StringBuffer
format(long number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
java.lang.StringBuffer
format(java.lang.Object number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
java.lang.Number
parse(java.lang.String source, java.text.ParsePosition parsePosition)
-
Methods inherited from class java.text.NumberFormat
clone, equals, format, format, getAvailableLocales, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingMode
-
-
-
-
Constructor Detail
-
NumberDateFormat
public NumberDateFormat(java.text.DateFormat dateFormat)
Constructs aNumberDateFormat
object using the givenDateFormat
.- Parameters:
dateFormat
-DateFormat
used to parse and format dates
-
-
Method Detail
-
format
public java.lang.StringBuffer format(double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
- Specified by:
format
in classjava.text.NumberFormat
-
format
public java.lang.StringBuffer format(long number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
- Specified by:
format
in classjava.text.NumberFormat
-
parse
public java.lang.Number parse(java.lang.String source, java.text.ParsePosition parsePosition)
- Specified by:
parse
in classjava.text.NumberFormat
-
format
public java.lang.StringBuffer format(java.lang.Object number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
- Overrides:
format
in classjava.text.NumberFormat
-
-