public interface Link extends Locatable, Serializable, Identifiable, Drawable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2019-01-06 01:35:05 +0100 (Sun, 06 Jan 2019) $, @version $Revision: 4831 $, by $Author: averbraeck $,
initial version Aug 19, 2014
Modifier and Type | Field and Description |
---|---|
static EventType |
GTU_ADD_EVENT
The timed event type for pub/sub indicating the addition of a GTU to the link.
|
static EventType |
GTU_REMOVE_EVENT
The timed event type for pub/sub indicating the removal of a GTU from the link.
|
Modifier and Type | Method and Description |
---|---|
void |
addGTU(GTU gtu)
Add a GTU to this link (e.g., for statistical purposes, or for a model on macro level).
|
OTSLine3D |
getDesignLine() |
LongitudinalDirectionality |
getDirectionality(GTUType gtuType)
This method returns the directionality of the link for a GTU type.
|
Node |
getEndNode() |
int |
getGTUCount()
Provide the number of GTUs on this link.
|
Set<GTU> |
getGTUs()
Provide a safe copy of the set of GTUs.
|
String |
getId() |
Length |
getLength() |
LinkType |
getLinkType() |
Network |
getNetwork()
Return the network in which this link is registered.
|
SimulatorInterface.TimeDoubleUnit |
getSimulator() |
Node |
getStartNode() |
void |
removeGTU(GTU gtu)
Remove a GTU from this link.
|
getBounds, getLocation
static final EventType GTU_ADD_EVENT
static final EventType GTU_REMOVE_EVENT
Network getNetwork()
String getId()
getId
in interface Identifiable
Node getStartNode()
Node getEndNode()
LinkType getLinkType()
OTSLine3D getDesignLine()
SimulatorInterface.TimeDoubleUnit getSimulator()
Length getLength()
LongitudinalDirectionality getDirectionality(GTUType gtuType)
gtuType
- GTUType; the GTU type to request the directionality forvoid addGTU(GTU gtu)
gtu
- GTU; the GTU to add.void removeGTU(GTU gtu)
gtu
- GTU; the GTU to remove.Set<GTU> getGTUs()
int getGTUCount()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.