Package jasima.core.simulation
Interface SimComponentContainer
-
- All Superinterfaces:
Cloneable,Notifier<SimComponent,SimComponent.SimComponentEvent>,NotifierListener<Simulation,Simulation.SimLifecycleEvent>,SimComponent,SimLifecycleListener,SimOperations,ValueStore
- All Known Implementing Classes:
Shop,SimComponentContainerBase,SimComponentRoot,SimEntity
public interface SimComponentContainer extends SimComponent
Interface to be implemented by all components containing sub-components. This interface is usually not implemented directly, but by deriving fromSimComponentContainerBase.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jasima.core.simulation.SimComponent
SimComponent.ProduceResultsEvent, SimComponent.SimComponentEvent, SimComponent.SimComponentLifeCycleMessage
-
Nested classes/interfaces inherited from interface jasima.core.simulation.SimLifecycleListener
SimLifecycleListener.DoneListener, SimLifecycleListener.OtherListener, SimLifecycleListener.ResetStatsListener, SimLifecycleListener.ResultsListener, SimLifecycleListener.SimEndListener, SimLifecycleListener.SimInitialized, SimLifecycleListener.SimStartListener
-
Nested classes/interfaces inherited from interface jasima.core.simulation.util.SimOperations
SimOperations.SimEventType
-
-
Field Summary
-
Fields inherited from interface jasima.core.simulation.SimComponent
NAME_SEPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SimComponentContainerclone()Public clone method.default <T extends SimComponent>
voidcomponentSetHelper(T newValue, Supplier<T> getter, Consumer<T> setter)default SimComponentgetByHierarchicalName(String hierarchicalName)Tries to find a component using the relative names given in the parameter.-
Methods inherited from interface jasima.core.util.observer.Notifier
addListener, addListener, addListener, fire, fire, getListener, numListener, removeCurrentListener, removeListener
-
Methods inherited from interface jasima.core.simulation.SimComponent
addChild, addComponent, addResult, containsChild, done, getChild, getChildByName, getChildren, getHierarchicalName, getName, getParent, getSim, handleOther, inform, init, isInitialized, isValidName, notifierImpl, numChildren, produceResults, removeChild, removeChildren, resetStats, setInitialized, setName, setParent, setSim, simEnd, simStart, valueStoreImpl
-
Methods inherited from interface jasima.core.simulation.util.SimOperations
activateEntity, currentPrio, end, getRootComponent, initRndGen, initRndGen, isEndRequested, isTraceEnabled, schedule, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, scheduleIn, schedulePeriodically, schedulePeriodically, scheduleProcess, scheduleProcess, simTime, simTimeAbs, simTimeToInstant, toSimTime, toSimTime, toSimTime, trace
-
Methods inherited from interface jasima.core.util.ValueStore
valueStoreContains, valueStoreGet, valueStoreGet, valueStoreGetAllKeys, valueStoreGetNumKeys, valueStorePut, valueStoreRemove, valueStoreUpdate
-
-
-
-
Method Detail
-
getByHierarchicalName
@Nullable default SimComponent getByHierarchicalName(String hierarchicalName)
Tries to find a component using the relative names given in the parameter. The first name segment has to match the container's name, next name-segment a child, next name-segment a child's child etc.Names segments are separated using '.', i.e., a valid hierarchical name could for instance be "network1.machines.welding1".
- Specified by:
getByHierarchicalNamein interfaceSimComponent- Parameters:
hierarchicalName- The name to check.- Returns:
- this, if name matches the parameter; null otherwise.
- See Also:
Simulation.getComponentByHierarchicalName(String)
-
componentSetHelper
default <T extends SimComponent> void componentSetHelper(T newValue, Supplier<T> getter, Consumer<T> setter)
-
clone
SimComponentContainer clone()
Public clone method. Implementing classes should implement a suitable functionality or throw aCloneNotSupportedExceptionwrapped in aRuntimeException.- Specified by:
clonein interfaceSimComponent
-
-