public interface Node 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-02-27 07:19:36 +0100 (Wed, 27 Feb 2019) $, @version $Revision: 5014 $, by $Author: averbraeck $,
initial version Aug 19, 2014
Modifier and Type | Method and Description |
---|---|
void |
addLink(Link link)
Add a link to this Node.
|
String |
getId() |
ImmutableSet<Link> |
getLinks() |
Network |
getNetwork()
Return the network in which this link is registered.
|
OTSPoint3D |
getPoint() |
boolean |
isDirectionallyConnectedTo(GTUType gtuType,
Node toNode)
Check if the current node is linked to the given Node in the specified direction for the given GTUType.
|
Set<Link> |
nextLinks(GTUType gtuType,
Link prevLink)
Determine the links connecting from the previous link via this Node for the given GTU type.
|
void |
removeLink(Link link)
Remove a link from this Node.
|
getBounds, getLocation
Network getNetwork()
String getId()
getId
in interface Identifiable
OTSPoint3D getPoint()
void addLink(Link link)
link
- Link; the link to add.void removeLink(Link link)
link
- Link; the link to remove.ImmutableSet<Link> getLinks()
Set<Link> nextLinks(GTUType gtuType, Link prevLink) throws NetworkException
gtuType
- GTUType; the GTU type to determine the next links forprevLink
- Link; the incoming link to the NodeNetworkException
- if the incoming link is not connected to this node for the given GTU typeboolean isDirectionallyConnectedTo(GTUType gtuType, Node toNode)
gtuType
- GTUType; the GTU type to check the connection for.toNode
- Node; the to nodeCopyright © 2014–2019 Delft University of Technology. All rights reserved.