public abstract class StatisticObjectSupportingTimeSpans extends StatisticObject implements java.util.Observer
StatisticObjectSupportingTimeSpans
class is the super class of the
specific data collector classes able to handle TimeSpan
objects.
If the data collector should be used to measure the lengths of
TimeSpan
s, the method setShowTimeSpansInReport(true)
should be called to appropriately assign the (reference) unit.UNDEFINED
Constructor and Description |
---|
StatisticObjectSupportingTimeSpans(Model ownerModel,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Constructor for a StatisticObjectSupportingTimeSpans, preliminarily without a unit assigned
|
Modifier and Type | Method and Description |
---|---|
boolean |
getShowTimeSpansInReport()
Are values printed as TimeSpans in the report?
|
java.lang.String |
getUnit()
Get an optional unit of reported value.
|
void |
setShowTimeSpansInReport(boolean value)
Sets if values should be interpreted and printed as TimeSpans
(subject to the experiment's reference unit) in the Report.
|
abstract void |
update(TimeSpan t)
Updates this data collector object with a specific
TimeSpan . |
getUnitText, round, setUnit
getCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, reset, resetAt, setCorrespondingSchedulable, setDescription, setReporter
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
public StatisticObjectSupportingTimeSpans(Model ownerModel, java.lang.String name, boolean showInReport, boolean showInTrace)
ownerModel
- Model : The model this StatisticObject is associated to.name
- java.lang.String : The name of this StatisticObjectshowInReport
- boolean : Flag for showing the report about this
StatisticObject.showInTrace
- boolean : Flag for showing this StatisticObject in trace
files.public abstract void update(TimeSpan t)
TimeSpan
.t
- TimeSpan : The time span to update this data collector.public java.lang.String getUnit()
StatisticObject
getUnit
in class StatisticObject
public void setShowTimeSpansInReport(boolean value)
setUnit(...)
,
this class assumes updates refer to the reference time unit.value
- boolean : true, if values should be printed as TimeSpans,
false if not.public boolean getShowTimeSpansInReport()