|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprefuse.data.parser.AbstractDateParser
public abstract class AbstractDateParser
Field Summary | |
---|---|
protected java.text.DateFormat |
m_dfmt
|
protected java.text.ParsePosition |
m_pos
|
Constructor Summary | |
---|---|
AbstractDateParser()
Create a new DateParser. |
|
AbstractDateParser(java.text.DateFormat dateFormat)
Create a new DateParser. |
|
AbstractDateParser(java.util.Locale locale)
|
Method Summary | |
---|---|
boolean |
canParse(java.lang.String text)
Indicates if the given text string can be successfully parsed by this parser. |
java.lang.String |
format(java.lang.Object value)
Get a String representation for the given value. |
abstract java.lang.Class<?> |
getType()
Get the data type for the values parsed by this parser. |
java.lang.Object |
parse(java.lang.String text)
Parse the given text string to a data value. |
abstract java.util.Date |
parseDate(java.lang.String text)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.text.DateFormat m_dfmt
protected java.text.ParsePosition m_pos
Constructor Detail |
---|
public AbstractDateParser()
public AbstractDateParser(java.text.DateFormat dateFormat)
dateFormat
- the DateFormat instance to use for parsingpublic AbstractDateParser(java.util.Locale locale)
Method Detail |
---|
public final boolean canParse(java.lang.String text)
DataParser
canParse
in interface DataParser
text
- the text string to check for parsability
public final java.lang.String format(java.lang.Object value)
DataParser
format
in interface DataParser
value
- the object value to format
public abstract java.lang.Class<?> getType()
DataParser
getType
in interface DataParser
public final java.lang.Object parse(java.lang.String text) throws DataParseException
DataParser
parse
in interface DataParser
text
- the text string to parse
DataParser.getType()
method
DataParseException
- if an error occurs during parsingpublic abstract java.util.Date parseDate(java.lang.String text) throws DataParseException
DataParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |