Constructor and Description |
---|
TokenCountAnalyzer()
Instantiates a TreeMap object as tokenCounts on creation.
|
TokenCountAnalyzer(java.util.Properties properties)
Constructor for TokenCountAnalyzer analyzer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getOutputFilePath()
Retrieves values from properties for path to output file.
|
java.util.Map |
getTokenCounts()
Accessor for the tokenCounts instance variable.
|
void |
processToken(java.lang.String token)
Processes a single token.
|
void |
writeOutputFile(java.lang.String inputFilePath)
Writes a text file listing each token, quantity pair on a new line.
|
public TokenCountAnalyzer()
public TokenCountAnalyzer(java.util.Properties properties)
properties
- Properties - Properties file values for this analyzer.public java.util.Map getTokenCounts()
public void processToken(java.lang.String token)
processToken
in interface Analyzer
token
- String - a single text token.public void writeOutputFile(java.lang.String inputFilePath)
writeOutputFile
in interface Analyzer
inputFilePath
- String - Path of the file being analyzed.public java.lang.String getOutputFilePath()