PCJ API
Version 1.2

bak.pcj.benchmark
Class Report

java.lang.Object
  extended bybak.pcj.benchmark.Report

public class Report
extends Object

This class represents reports of results from benchmarks. Results are collected in a report that can finally be transformed to some external representation.

Since:
1.0

Constructor Summary
Report()
          Creates a new report for benchmark results.
 
Method Summary
 void addResult(Result result)
          Adds a result to this report.
 void clearResults()
          Clears the results of this report.
 String getProperty(String key)
          Returns a property of this report.
 Collection getResults()
          Returns the results of this report in no particular order.
 void putProperty(String key, String value)
          Adds a property to this report.
 void readResults(Reader in)
          Reads results into this report from a specified reader.
 void writeHTML(Writer out)
          Formats this report as HTML on a specified writer.
 void writeResults(Writer out)
          Writes the results of this report to a specified writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Report

public Report()
Creates a new report for benchmark results.

Method Detail

addResult

public void addResult(Result result)
Adds a result to this report.

Parameters:
result - the result to add.
Throws:
NullPointerException - if result is null.

getResults

public Collection getResults()
Returns the results of this report in no particular order.

Returns:
an unmodifiable collection of the results of this report in no particular order.

clearResults

public void clearResults()
Clears the results of this report.


putProperty

public void putProperty(String key,
                        String value)
Adds a property to this report.

Parameters:
key - the key of the property.
value - the value of the property. If the value is null, the property is removed from the report.
Throws:
NullPointerException - if key is null.

getProperty

public String getProperty(String key)
Returns a property of this report.

Parameters:
key - the key of the property to return.
Returns:
the value of the property with the specified key; returns null if no such property is in this report.
Throws:
NullPointerException - if key is null.

readResults

public void readResults(Reader in)
                 throws IOException
Reads results into this report from a specified reader.

Parameters:
in - the reader from which to read results.
Throws:
IOException - if an error occurs reading from out.

writeResults

public void writeResults(Writer out)
                  throws IOException
Writes the results of this report to a specified writer.

Parameters:
out - the writer on which to write the results.
Throws:
IOException - if an error occurs writing to out.

writeHTML

public void writeHTML(Writer out)
               throws IOException
Formats this report as HTML on a specified writer.

Parameters:
out - the writer on which to format this report.
Throws:
NullPointerException - if out is null.
IOException - if an error occurs writing to out.

PCJ API
Version 1.2

Report a bug or request a feature.
Further information on the development and latest release of PCJ can be found at the project homepage.

Primitive Collections for Java is released under the GNU Lesser General Public License.
Copyright © 2002, 2003 Søren Bak. All Rights Reserved.

Hosted by SourceForge.net
SourceForge.net Logo