|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.edu.agh.cast.importer.base.parser.analyzer.AbstractDateAnalyzer
public abstract class AbstractDateAnalyzer
Analyzer for the objects in Date format. The actual format should be specified in analyzer's constructor
or set with use of the date format setter method, before the analyze() method is used.
| Field Summary | |
|---|---|
protected SimpleDateFormat |
dateFormat
The date format. |
| Constructor Summary | |
|---|---|
AbstractDateAnalyzer()
The default constructor. |
|
| Method Summary | |
|---|---|
List<Object> |
analyze(String tokenToAnalyze)
Analyzes a given token and returns an appropriate object. |
boolean |
equals(Object obj)
|
String |
getDatePattern()
|
int |
hashCode()
|
boolean |
isComplete()
Checks whether current analyzer is fully configured - all necessary parameters are present and the the analysis process can be performed. |
protected Date |
parseDate(String text)
|
void |
setDateFormat(String format)
Setter for the date format attribute. |
void |
setDefaultValue(String defaultValue)
Sets the default value for the analyzer. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface pl.edu.agh.cast.importer.base.parser.analyzer.IAnalyzer |
|---|
createCopy, getReturnTypes |
| Field Detail |
|---|
protected SimpleDateFormat dateFormat
| Constructor Detail |
|---|
public AbstractDateAnalyzer()
setDateFormat(String) method.
| Method Detail |
|---|
public List<Object> analyze(String tokenToAnalyze)
throws UnsupportedTokenException
analyze in interface IAnalyzertokenToAnalyze - the token to analyze
UnsupportedTokenExceptionIAnalyzer.analyze(java.lang.String)public void setDefaultValue(String defaultValue)
setDefaultValue in interface IAnalyzerdefaultValue - the analyzer's default valueIAnalyzer.setDefaultValue(java.lang.String)public boolean isComplete()
isComplete in interface IAnalyzerIAnalyzer.isComplete()
protected Date parseDate(String text)
throws ParseException
ParseExceptionpublic String toString()
toString in class ObjectObject.toString()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public String getDatePattern()
public void setDateFormat(String format)
throws IllegalArgumentException
format - the date format to parse
IllegalArgumentException - when specified format is not correct
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||