public class SimEvent extends Object implements Comparable<SimEvent>
Class representing a simulation event.
Regardless specific event details, every event is defined by the event arrival time and a priority value. The highest priority event is called first.
Modifier and Type | Class and Description |
---|---|
static class |
SimEvent.DemandAdd
This class represents the request to add a new Demand.
|
static class |
SimEvent.DemandModify
This class represents the request to modify an existing Demand.
|
static class |
SimEvent.DemandRemove
This class represents the request to remove an existing Demand.
|
static class |
SimEvent.DestinationModule
Module that will receive the associated event.
|
static class |
SimEvent.LinkAdd
This class represents the request to add a new Link.
|
static class |
SimEvent.LinkModify
This class represents the request to modify an existing Link
|
static class |
SimEvent.LinkRemove
This class represents the request to remove an existing Link.
|
static class |
SimEvent.MulticastDemandModify
This class represents the request to modify an existing Demand.
|
static class |
SimEvent.NodesAndLinksChangeFailureState
This class represents the request to modify the failure state of multiple links and nodes.
|
static class |
SimEvent.RouteAdd
This class represents the request to add a new Route.
|
static class |
SimEvent.RouteModify
This class represents the request to modify an existing Route.
|
static class |
SimEvent.RouteRemove
This class represents the request to remove and existing Route.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRIORITY
Default priority for events (higher values give higher priority).
|
Constructor and Description |
---|
SimEvent(double eventTime,
SimEvent.DestinationModule destinationModule,
int type,
int priority,
Object object)
Constructor that allows to generate an event with a custom object.
|
SimEvent(double eventTime,
SimEvent.DestinationModule destinationModule,
int type,
Object object)
Constructor that allows to generate an event with a custom object.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SimEvent e) |
SimEvent.DestinationModule |
getEventDestinationModule()
Returns the destination module of the event.
|
Object |
getEventObject()
Returns the custom object of the event (may be null).
|
int |
getEventPriority()
Returns the event priority.
|
double |
getEventTime()
Returns the event time.
|
int |
getEventType()
Returns the custom event type.
|
String |
toString() |
public static final int DEFAULT_PRIORITY
public SimEvent(double eventTime, SimEvent.DestinationModule destinationModule, int type, int priority, Object object)
eventTime
- Event timedestinationModule
- Module that will receive the eventtype
- Event typepriority
- Event priorityobject
- Custom objectpublic SimEvent(double eventTime, SimEvent.DestinationModule destinationModule, int type, Object object)
eventTime
- Event timetype
- Event typeobject
- Custom objectdestinationModule
- Module that will receive the eventpublic final int compareTo(SimEvent e)
compareTo
in interface Comparable<SimEvent>
public final SimEvent.DestinationModule getEventDestinationModule()
Returns the destination module of the event.
public final Object getEventObject()
public final int getEventPriority()
public final double getEventTime()
public final int getEventType()
Copyright © 2018. All rights reserved.