Package jsl.observers
Class ModelElementObserver
- java.lang.Object
-
- jsl.observers.ModelElementObserver
-
- All Implemented Interfaces:
ObserverIfc
,GetNameIfc
,IdentityIfc
- Direct Known Subclasses:
AcrossReplicationHalfWidthChecker
,AcrossReplicationRelativePrecisionChecker
,AntitheticEstimator
,BatchStatisticObserver
,CounterObserver
,CSVReport
,JSLDatabaseObserver.SimulationDatabaseObserver
,ModelActionObserver
,ModelElementObserverExample
,Mover2DObserver
,MultipleComparisonDataCollector
,ReplicationDataCollector
,ResourcePool.ResourceUnitObserver
,SimulationResponseDataCollector
,STSStatisicalObserver
,WelchDataArrayObserver
,WelchFileObserver
public class ModelElementObserver extends java.lang.Object implements ObserverIfc, IdentityIfc
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
myName
-
Constructor Summary
Constructors Constructor Description ModelElementObserver()
ModelElementObserver(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterExperiment(ModelElement m, java.lang.Object arg)
protected void
afterReplication(ModelElement m, java.lang.Object arg)
protected void
beforeExperiment(ModelElement m, java.lang.Object arg)
protected void
beforeReplication(ModelElement m, java.lang.Object arg)
int
getId()
Gets a uniquely assigned integer identifier for this model element observer.protected ModelElement
getModelElement()
java.lang.String
getName()
Gets this model element observer's name.protected void
initialize(ModelElement m, java.lang.Object arg)
protected void
montecarlo(ModelElement m, java.lang.Object arg)
protected void
removedFromModel(ModelElement m, java.lang.Object arg)
protected void
replicationEnded(ModelElement m, java.lang.Object arg)
protected void
setModelElement(ModelElement m)
void
setName(java.lang.String str)
Sets the name of this model elementprotected void
timedUpdate(ModelElement m, java.lang.Object arg)
java.lang.String
toString()
void
update(java.lang.Object observable, java.lang.Object arg)
This method is called when the observable needs observingprotected void
update(ModelElement m, java.lang.Object arg)
protected void
warmUp(ModelElement m, java.lang.Object arg)
-
-
-
Method Detail
-
setName
public final void setName(java.lang.String str)
Sets the name of this model element- Parameters:
str
- The name as a string.
-
getName
public final java.lang.String getName()
Gets this model element observer's name.- Specified by:
getName
in interfaceGetNameIfc
- Returns:
- The name of the model element observer
-
getId
public final int getId()
Gets a uniquely assigned integer identifier for this model element observer. This identifier is assigned when the model element observer is created. It may vary if the order of creation changes.- Specified by:
getId
in interfaceIdentityIfc
- Returns:
- The identifier for the model element observer
-
update
public void update(java.lang.Object observable, java.lang.Object arg)
Description copied from interface:ObserverIfc
This method is called when the observable needs observing- Specified by:
update
in interfaceObserverIfc
- Parameters:
observable
- the thing observedarg
- an object of info
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getModelElement
protected final ModelElement getModelElement()
-
setModelElement
protected final void setModelElement(ModelElement m)
-
beforeExperiment
protected void beforeExperiment(ModelElement m, java.lang.Object arg)
-
beforeReplication
protected void beforeReplication(ModelElement m, java.lang.Object arg)
-
initialize
protected void initialize(ModelElement m, java.lang.Object arg)
-
montecarlo
protected void montecarlo(ModelElement m, java.lang.Object arg)
-
replicationEnded
protected void replicationEnded(ModelElement m, java.lang.Object arg)
-
afterReplication
protected void afterReplication(ModelElement m, java.lang.Object arg)
-
update
protected void update(ModelElement m, java.lang.Object arg)
-
warmUp
protected void warmUp(ModelElement m, java.lang.Object arg)
-
timedUpdate
protected void timedUpdate(ModelElement m, java.lang.Object arg)
-
afterExperiment
protected void afterExperiment(ModelElement m, java.lang.Object arg)
-
removedFromModel
protected void removedFromModel(ModelElement m, java.lang.Object arg)
-
-