public class SimQueueGateEvent<J extends SimJob,Q extends SimQueue> extends SimJQEvent<J,Q>
SimEvent for controlling the gate of a SimQueueWithGate.
The event can be created for any SimQueue, but it has no effect unless that queue
is a SimQueueWithGate.
This is actually checked at runtime, and not reflected in the generic-type arguments.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
SimJQEvent.Arrival<J extends SimJob,Q extends SimQueue>, SimJQEvent.AutoRevocation<J extends SimJob,Q extends SimQueue>, SimJQEvent.Departure<J extends SimJob,Q extends SimQueue>, SimJQEvent.Drop<J extends SimJob,Q extends SimQueue>, SimJQEvent.Revocation<J extends SimJob,Q extends SimQueue>, SimJQEvent.Start<J extends SimJob,Q extends SimQueue>SimEntityEvent.Reset, SimEntityEvent.Update| Constructor and Description |
|---|
SimQueueGateEvent(Q queue,
double time,
int gatePassageCredits)
Creates a gate-setting event at a specific queue.
|
| Modifier and Type | Method and Description |
|---|---|
SimJQEvent |
copyForQueueAndJob(Q newQueue,
J newJob)
Creates a copy of this event, but for a different queue and/or a different job.
|
int |
getGatePassageCredits()
Returns the number of gate-passage credits of the event.
|
getJob, getQueuegetEntitypublic SimQueueGateEvent(Q queue, double time, int gatePassageCredits)
The value zero for the gate-passage credits effectively closes the gate;
Integer.MAX_VALUE is treated as infinity.
queue - The queue at which to control the gate.time - The time at which to control the gate.gatePassageCredits - The gate-passage credits embedded in this event.IllegalArgumentException - If queue == null, or the number of gate-passage credits is strictly negative.SimQueueWithGate.setGatePassageCredits(double, int)public SimJQEvent copyForQueueAndJob(Q newQueue, J newJob)
SimJQEvent
When a parameter is null, it is left untouched.
The event's action, if non-null, has to be copied into an action retrofitted to the new queue and/or job.
copyForQueueAndJob in class SimJQEvent<J extends SimJob,Q extends SimQueue>newQueue - The new queue (the SimQueue to which the newly created event applies).newJob - The new job (the SimQueue to which the newly created event applies).public final int getGatePassageCredits()
The value zero effectively closes the gate;
Integer.MAX_VALUE is treated as infinity.
Copyright © 2018. All rights reserved.