|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbcds.phison.sim.StatsExporterBase
public abstract class StatsExporterBase
Provides default functionality and data for classes implementing
the StatsExporter
interface.
Constructor Summary | |
---|---|
StatsExporterBase()
|
Method Summary | |
---|---|
Environ |
getEnviron()
Returns the environment object that was received through setup or created there (if the parameters was null). |
java.lang.Object[] |
getEnvParams()
Returns an empty array. |
java.lang.String |
getName()
Returns this instance's unqualified class name. |
static java.lang.String |
sanitizeFilename(java.lang.String fname,
java.lang.String replacement)
Returns a string consisting of "valid" characters only. |
void |
setup(SimStatsCollector stats,
Environ env)
Saves the parameters stats and env ,
and calls env.adaptTypes. |
SimStatsCollector |
stats()
Returns the statistics collector object received in setup. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bcds.phison.sim.StatsExporter |
---|
run |
Constructor Detail |
---|
public StatsExporterBase()
Method Detail |
---|
public void setup(SimStatsCollector stats, Environ env)
stats
and env
,
and calls env.adaptTypes. If env
is null,
a new instance is first created.
setup
in interface StatsExporter
public java.lang.String getName()
getName
in interface WithEnvParams
public java.lang.Object[] getEnvParams()
getEnvParams
in interface WithEnvParams
public Environ getEnviron()
getEnviron
in interface WithEnvParams
public SimStatsCollector stats()
public static java.lang.String sanitizeFilename(java.lang.String fname, java.lang.String replacement)
fname
not in this set are replaced with
the string replacement
.
Beware that the replacement char/string may contain elements that are "invalid" by the validity definition in this function; that situation is left unchecked.
This function is typically used to transform the id or name of a statistics collector into a filename. Hence the restriction on the character set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |