pl.edu.agh.cast.importer.base.parser.analyzer
Class IntegerAnalyzer

java.lang.Object
  extended by pl.edu.agh.cast.importer.base.parser.analyzer.IntegerAnalyzer
All Implemented Interfaces:
IAnalyzer

public class IntegerAnalyzer
extends Object
implements IAnalyzer

Analyzer for the Integer objects.

Author:
AGH CAST Team

Constructor Summary
IntegerAnalyzer()
           
 
Method Summary
 List<Object> analyze(String tokenToAnalyze)
          Returns list containing one integer object which is equal to Integer(token.trim()).
 IAnalyzer createCopy()
          Creates a copy of the current analyzer.
 boolean equals(Object obj)
          
 List<Class<?>> getReturnTypes()
          Retrieves the return types of the IAnalyzer.analyze(String) method.
 int hashCode()
          
 boolean isComplete()
          Checks whether current analyzer is fully configured - all necessary parameters are present and the the analysis process can be performed.
 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
 

Constructor Detail

IntegerAnalyzer

public IntegerAnalyzer()
Method Detail

analyze

public List<Object> analyze(String tokenToAnalyze)
                     throws UnsupportedTokenException
Returns list containing one integer object which is equal to Integer(token.trim()). If token is null or empty (trim().length == 0), null is returned.

Specified by:
analyze in interface IAnalyzer
Parameters:
tokenToAnalyze - the token to analyze
Returns:
the list of analyzed objects
Throws:
UnsupportedTokenException - when cannot parse token as integer.
See Also:
IAnalyzer.analyze(java.lang.String)

getReturnTypes

public List<Class<?>> getReturnTypes()
Retrieves the return types of the IAnalyzer.analyze(String) method.

Specified by:
getReturnTypes in interface IAnalyzer
Returns:
analysis return types
See Also:
IAnalyzer.getReturnTypes()

setDefaultValue

public void setDefaultValue(String defaultValue)
Sets the default value for the analyzer.

Specified by:
setDefaultValue in interface IAnalyzer
Parameters:
defaultValue - the analyzer's default value
See Also:
IAnalyzer.setDefaultValue(java.lang.String)

createCopy

public IAnalyzer createCopy()
Creates a copy of the current analyzer.

Specified by:
createCopy in interface IAnalyzer
Returns:
analyzer of the same type and parameters set
See Also:
IAnalyzer.createCopy()

isComplete

public boolean isComplete()
Checks whether current analyzer is fully configured - all necessary parameters are present and the the analysis process can be performed.

Specified by:
isComplete in interface IAnalyzer
Returns:
flag indicating the analyzer's completion state
See Also:
IAnalyzer.isComplete()

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.