public class SimEvent extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable<SimEvent>
Simulation,
SimEntity| Modifier and Type | Field and Description |
|---|---|
static int |
CREATE |
static int |
ENULL |
static int |
HOLD_DONE |
static int |
SEND |
| Constructor and Description |
|---|
SimEvent()
Create a blank event.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Create an exact copy of this event.
|
int |
compareTo(SimEvent event) |
double |
endWaitingTime()
Get the simulation time that this event was removed from the queue for service.
|
double |
eventTime()
Get the simulation time that this event was scheduled.
|
java.lang.Object |
getData()
Get the data passed in this event.
|
int |
getDestination()
Get the unique id number of the entity which received this event.
|
int |
getSource()
Get the unique id number of the entity which scheduled this event.
|
int |
getTag()
Get the user-defined tag of this event.
|
int |
getType()
The internal type
|
int |
scheduledBy()
Get the unique id number of the entity which scheduled this event.
|
void |
setDestination(int d)
Set the destination entity of this event.
|
protected void |
setEndWaitingTime(double end_waiting_time)
Used to set the time at which this event finished waiting in the event
|
protected void |
setSerial(long serial) |
void |
setSource(int s)
Set the source entity of this event.
|
java.lang.String |
toString() |
int |
type()
Get the user-defined tag of this event
|
public static final int ENULL
public static final int SEND
public static final int HOLD_DONE
public static final int CREATE
protected void setSerial(long serial)
protected void setEndWaitingTime(double end_waiting_time)
end_waiting_time - public java.lang.String toString()
toString in class java.lang.Objectpublic int getType()
public int compareTo(SimEvent event)
compareTo in interface java.lang.Comparable<SimEvent>Comparable.compareTo(Object)public int getDestination()
public int getSource()
public double eventTime()
public double endWaitingTime()
public int type()
public int scheduledBy()
public int getTag()
public java.lang.Object getData()
public java.lang.Object clone()
clone in class java.lang.Objectpublic void setSource(int s)
s - The unique id number of the entitypublic void setDestination(int d)
d - The unique id number of the entity