public class TokenSizeAnalyzer extends java.lang.Object implements Analyzer
Constructor and Description |
---|
TokenSizeAnalyzer()
Constructor for TokenSizeAnalyzer.
|
TokenSizeAnalyzer(java.util.Properties properties)
Constructor for TokenSizeAnalyzer.
|
Modifier and Type | Method and Description |
---|---|
int |
getMaximumSize()
Accessor for the maximumSize instance variable.
|
java.lang.String |
getOutputFilePath()
Retrieves values from properties for path to output file.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getTokenSizes()
Accessor for the tokenSizes instance variable.
|
void |
processToken(java.lang.String token)
Processes a single token.
|
void |
writeOutputFile(java.lang.String inputFilePath)
Writes a text file listing each length, quantity pair on a new line.
|
public TokenSizeAnalyzer()
public TokenSizeAnalyzer(java.util.Properties properties)
properties
- Properties - Properties file values for this analyzer.public java.util.Map<java.lang.Integer,java.lang.Integer> getTokenSizes()
public int getMaximumSize()
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()