public final class SimQueueCompositeStateHandler extends Object implements SimQueueStateHandler
SimQueueStateHandler for composite queues.Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
SimQueueComposite| Constructor and Description |
|---|
SimQueueCompositeStateHandler(Set<SimQueue> subQueues,
Set<DefaultSimQueueState> subQueueStates)
Creates the state handler for composite queues.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getHandlerName()
Returns "SimQueueCompositeHandler".
|
DefaultSimQueueState |
getSubQueueState(int i)
Gets the state of sub-queue with given index.
|
void |
initHandler(DefaultSimQueueState queueState)
Initializes the handler, and passes the
DefaultSimQueueState object. |
void |
resetHandler(DefaultSimQueueState queueState)
Resets the (state represented by) this handler.
|
protected void |
resetSubQueueStates()
Resets the state of each sub-queue.
|
public SimQueueCompositeStateHandler(Set<SimQueue> subQueues, Set<DefaultSimQueueState> subQueueStates)
subQueues - The sub-queues.subQueueStates - The individual states (initial state objects) of the sub-queues (in proper order!)public final DefaultSimQueueState getSubQueueState(int i)
i - The index.protected void resetSubQueueStates()
public final String getHandlerName()
getHandlerName in interface SimQueueStateHandlerpublic final void initHandler(DefaultSimQueueState queueState)
SimQueueStateHandlerDefaultSimQueueState object.
This method is called only once during registration at the DefaultSimQueueState object.
initHandler in interface SimQueueStateHandlerqueueState - The DefaultSimQueueState at which we register, non-null.DefaultSimQueueState.registerHandler(org.javades.jqueues.r5.util.predictor.state.SimQueueStateHandler)public void resetHandler(DefaultSimQueueState queueState)
SimQueueStateHandlerresetHandler in interface SimQueueStateHandlerqueueState - The DefaultSimQueueState at which we are registered, non-null.SimQueueState.reset(),
DefaultSimQueueState.reset()Copyright © 2018. All rights reserved.