createDefaultReporter
public Reporter createDefaultReporter()
This method provides a reporter to generate report data about this
reportable. In this general implementation, a StandardReporter
is returned. Lacking further knowledge about a specific reportable,
the StandardReporter
is only able to read out the
reportable's name, number of observations and time of last reset.
Thus, it is highly recommended that subclasses override this method
to return an appropriate default reporter for the specific reportable
object. All reportable objects in DESMO-J like Accumulate
,
Tally
, Count
, Queue
, and many
others provide such reporters.
If you want to extend the framework with new reportable objects,
provide a suitable reporter as well and override this method to return
an instance of the reporter.
If you just need to replace the reporter used by an existing reportable
(while not requiring any changes to the reportable itself),
there is no need to create a subclass of the reportable: Instead of
overriding this method, just call setReporter()
to have
this reportable use a custom reporter instead of the default reporter.
- Returns:
- desmoj.core.report.Reporter : A specific reporter for this reportable