|
|||||||||
| Home >> All >> [ desmoj overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
desmoj
Class QueueLink

java.lang.Objectdesmoj.QueueLink
- public class QueueLink
- extends java.lang.Object
QueueLinks make up the glue that keeps QueueList objects and entities stick together. It keeps references to :
- the QueueList object where this QueueLink is inserted
- a reference to the preceeding link in the chain of the QueueList
- a reference to the next link in the chain of the QueueList
- a reference to another QueueList's queuelink that the given Entity is also queued in
- a reference to the actual entity handled by this queuelink
- the point of simulation time the entity entered the QueueList object
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
| Field Summary | |
private SimTime |
entryTime
The point of simulation time that the entity entered the queuelist. |
private Entity |
item
Link to the entity handled by this queuelist. |
private QueueList |
motherQList
Reference to the QueueList this queuelink is an element of. |
private QueueLink |
next
Link to the next queuelink in the queuelist. |
private QueueLink |
nextQueue
Link to the queuelink in another queuelist that this queuelink's entity is also enqueued in. |
private QueueLink |
prev
Link to the previous queuelink in the queuelist. |
| Constructor Summary | |
(package private) |
QueueLink(Entity e,
SimTime timeIn,
QueueList q)
Constructs a queuelink with the given parameters to insert it into a queuelist. |
| Method Summary | |
(package private) Entity |
getEntity()
Returns the entity associated with this queuelink. |
(package private) QueueLink |
getNext()
Returns the queuelink linked after this queuelink in the queuelist or null if there is no next queuelink |
(package private) QueueLink |
getNextQueue()
Returns the reference to another queuelist's queuelink or |
(package private) QueueLink |
getPrev()
Returns the queuelink linked before this queuelink in the queuelist or null if there is no previous queuelink |
(package private) QueueList |
getQueueList()
Returns the reference to the queuelist this queuelink is associated to or |
(package private) void |
insertAfter(QueueLink which)
Inserts this queuelink directly after the given queuelink in that queuelink's queuelist. |
(package private) void |
insertBefore(QueueLink which)
Inserts this queuelink directly before the given queuelink in that queuelink's queuelist. |
(package private) void |
remove()
Removes all references this queuelink has set up leaving no holes in the chains of queuelists and the entity's list of Queues it is in. |
(package private) void |
sendWarning(java.lang.String description,
java.lang.String location,
java.lang.String reason,
java.lang.String prevention)
Sends a warning to the error output by forwarding it to the associated queuelist's sendwarning method. |
(package private) void |
setNext(QueueLink nextLink)
Sets the queuelink following this one to the queuelink given as parameter. |
(package private) void |
setNextQueue(QueueLink nextQ)
Inserts the given queuelink directly after this queuelink in the single linked chain that entities have to keep track of the queues they are in. |
(package private) void |
setPrev(QueueLink prevLink)
Sets the queuelink preceding this one to the queuelink given as parameter. |
(package private) SimTime |
timeIn()
Returns the point of simulation time this entity had entered the queue. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
motherQList
private QueueList motherQList
- Reference to the QueueList this queuelink is an element of.
prev
private QueueLink prev
- Link to the previous queuelink in the queuelist.
next
private QueueLink next
- Link to the next queuelink in the queuelist.
nextQueue
private QueueLink nextQueue
- Link to the queuelink in another queuelist that this queuelink's
entity is also enqueued in.
item
private Entity item
- Link to the entity handled by this queuelist.
entryTime
private SimTime entryTime
- The point of simulation time that the entity entered the queuelist.
| Constructor Detail |
QueueLink
QueueLink(Entity e, SimTime timeIn, QueueList q)
- Constructs a queuelink with the given parameters to insert it into
a queuelist. This queuelink is automatically inserted into the
given Entity's list of associated queues it is queued in.
| Method Detail |
getEntity
Entity getEntity()
- Returns the entity associated with this queuelink.
getNext
QueueLink getNext()
- Returns the queuelink linked after this queuelink in the queuelist or
nullif there is no next queuelink
getNextQueue
QueueLink getNextQueue()
- Returns the reference to another queuelist's queuelink or
if no other queuelist's queuelink is associated with this.
getPrev
QueueLink getPrev()
- Returns the queuelink linked before this queuelink in the queuelist or
nullif there is no previous queuelink
getQueueList
QueueList getQueueList()
- Returns the reference to the queuelist this queuelink
is associated to or
if this queuelink is not already part of such a queuelist.
insertAfter
void insertAfter(QueueLink which)
- Inserts this queuelink directly after the given queuelink in
that queuelink's queuelist.
Can only be linked if this queuelink is not already linked somewhere
else.
insertBefore
void insertBefore(QueueLink which)
- Inserts this queuelink directly before the given queuelink in
that queuelink's queuelist.
Can only be linked if this queuelink is not already linked somewhere
else.
remove
void remove()
- Removes all references this queuelink has set up leaving no holes
in the chains of queuelists and the entity's list of Queues it is in.
Call this method directly before dropping the reference to this
queuelink.
sendWarning
void sendWarning(java.lang.String description, java.lang.String location, java.lang.String reason, java.lang.String prevention)
- Sends a warning to the error output by forwarding it to the associated
queuelist's
sendwarningmethod.
setNext
void setNext(QueueLink nextLink)
- Sets the queuelink following this one to the queuelink given as parameter.
setNextQueue
void setNextQueue(QueueLink nextQ)
- Inserts the given queuelink directly after this queuelink in
the single linked chain that entities have to keep track of the queues
they are in.
Note that it is perfectly legal to pass
nullvalues here since it must be possible to remove a reference. This method is for use by the entity only.
setPrev
void setPrev(QueueLink prevLink)
- Sets the queuelink preceding this one to the queuelink given as parameter.
timeIn
SimTime timeIn()
- Returns the point of simulation time this entity had entered the queue.
|
|||||||||
| Home >> All >> [ desmoj overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
desmoj.QueueLink