public class CSVPropertyDataLogger
extends java.lang.Object
implements java.beans.PropertyChangeListener
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER |
private java.io.File |
outputFile |
protected java.util.Map<java.lang.String,java.io.File> |
temporaryDataFiles |
protected java.util.Map<java.lang.String,java.io.BufferedWriter> |
temporaryDataWriters |
Constructor and Description |
---|
CSVPropertyDataLogger(java.io.File outputFile)
Instantiate a CSVPropertyDataLogger with given output file.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
getOutputFile() |
java.util.Map<java.lang.String,java.io.File> |
getTemporaryDataFiles() |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
If hearing a property for the first time, create a temporary file and
store in temporaryDataFiles keyed by the property name.
|
void |
reset()
Clear all internal data
|
void |
setOutputFile(java.io.File outputFile) |
void |
writeOutputFile()
Write the output file in comma separate value (CSV) format.
|
private static final java.util.logging.Logger LOGGER
protected java.util.Map<java.lang.String,java.io.File> temporaryDataFiles
protected java.util.Map<java.lang.String,java.io.BufferedWriter> temporaryDataWriters
private java.io.File outputFile
public CSVPropertyDataLogger(java.io.File outputFile)
outputFile
- Given output filepublic void reset()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- Given PropertyChangeEventpublic void writeOutputFile()
public java.util.Map<java.lang.String,java.io.File> getTemporaryDataFiles()
public java.io.File getOutputFile()
public void setOutputFile(java.io.File outputFile)
outputFile
- the outputFile to set