|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.hpi.fgis.dude.output.statisticoutput.AbstractStatisticOutput de.hpi.fgis.dude.output.statisticoutput.SimpleStatisticOutput
public class SimpleStatisticOutput
SimpleStatisticOutput
prints the statistics in a simple, formatted fashion. It is preferably used for console output.
Field Summary |
---|
Fields inherited from class de.hpi.fgis.dude.output.statisticoutput.AbstractStatisticOutput |
---|
defaultLabels |
Constructor Summary | |
---|---|
protected |
SimpleStatisticOutput()
Internal constructor for Jsonable deserialization. |
|
SimpleStatisticOutput(File out)
Initializes a SimpleStatisticOutput with no statistics. |
|
SimpleStatisticOutput(File out,
StatisticComponent statistics)
Initializes the SimpleStatisticOutput . |
|
SimpleStatisticOutput(OutputStream out)
Initializes a SimpleStatisticOutput with no statistics. |
|
SimpleStatisticOutput(OutputStream out,
StatisticComponent statistics)
Initializes the SimpleStatisticOutput . |
Method Summary | |
---|---|
void |
close()
Closes the underlying stream. |
boolean |
equals(Object obj)
|
void |
fromJson(DuDeJsonParser<?> jsonParser)
Initializes the current instance using the passed DuDeJsonParser . |
int |
hashCode()
|
static void |
main(String[] args)
|
void |
toJson(DuDeJsonGenerator jsonGenerator)
Generates the Json code using the passed DuDeJsonGenerator . |
String |
toString()
|
void |
writeStatistics()
Writes the stored statistics. |
Methods inherited from class de.hpi.fgis.dude.output.statisticoutput.AbstractStatisticOutput |
---|
getLabels, getOptionalEntries, getStatistics, resetOptionalStatisticEntries, setOptionalStatisticEntry, setOptionalStatisticEntry, setStatistics |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected SimpleStatisticOutput()
Jsonable
deserialization.
public SimpleStatisticOutput(File out) throws FileNotFoundException
SimpleStatisticOutput
with no statistics. The statistics need to be set later on.
out
- The output stream that is used for the output.
FileNotFoundException
- If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created,
or if some other error occurs while opening or creating the filepublic SimpleStatisticOutput(File out, StatisticComponent statistics) throws FileNotFoundException
SimpleStatisticOutput
.
out
- The file that is used for the output.statistics
- The StatisticComponent
instance that provides all the statistics.
FileNotFoundException
- If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created,
or if some other error occurs while opening or creating the filepublic SimpleStatisticOutput(OutputStream out)
SimpleStatisticOutput
with no statistics. The statistics need to be set later on.
out
- The output stream that is used for the output.public SimpleStatisticOutput(OutputStream out, StatisticComponent statistics)
SimpleStatisticOutput
.
out
- The file that is used for the output.statistics
- The StatisticComponent
instance that provides all the statistics.Method Detail |
---|
public static void main(String[] args)
args
- public void close() throws IOException
StatisticOutput
close
in interface StatisticOutput
close
in class AbstractStatisticOutput
IOException
- If an error occurs while closing the underlying stream.public boolean equals(Object obj)
equals
in class Object
public void fromJson(DuDeJsonParser<?> jsonParser) throws org.codehaus.jackson.JsonParseException, IOException
Jsonable
DuDeJsonParser
.
fromJson
in interface Jsonable
jsonParser
- The parser that is used for extracting the data out of the Json.
org.codehaus.jackson.JsonParseException
- If an error occurs while parsing the Json.
IOException
- If an error occurs while reading from the stream.public int hashCode()
hashCode
in class Object
public void toJson(DuDeJsonGenerator jsonGenerator) throws org.codehaus.jackson.JsonGenerationException, IOException
Jsonable
DuDeJsonGenerator
.
toJson
in interface Jsonable
jsonGenerator
- The DuDeJsonGenerator
that is used internally.
org.codehaus.jackson.JsonGenerationException
- If an error occurs while generating the Json syntax.
IOException
- If an error occurs while writing to the output.public String toString()
toString
in class Object
public void writeStatistics()
StatisticOutput
writeStatistics
in interface StatisticOutput
writeStatistics
in class AbstractStatisticOutput
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |