public class OTSLink extends Object implements Link, Serializable, LocatableInterface
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-09-26 12:11:42 +0200 (Sat, 26 Sep 2015) $, @version $Revision: 1454 $, by $Author: averbraeck $,
initial version Aug 19, 2014
| Constructor and Description |
|---|
OTSLink(String id,
OTSNode startNode,
OTSNode endNode,
LinkType linkType,
OTSLine3D designLine)
Construct a new link with infinite capacity.
|
OTSLink(String id,
OTSNode startNode,
OTSNode endNode,
LinkType linkType,
OTSLine3D designLine,
org.djunits.value.vdouble.scalar.Frequency capacity)
Construct a new link.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Bounds |
getBounds() |
org.djunits.value.vdouble.scalar.Frequency |
getCapacity() |
OTSLine3D |
getDesignLine() |
OTSNode |
getEndNode() |
String |
getId() |
org.djunits.value.vdouble.scalar.Length.Rel |
getLength() |
LinkType |
getLinkType() |
DirectedPoint |
getLocation() |
OTSNode |
getStartNode() |
int |
hashCode() |
void |
setCapacity(org.djunits.value.vdouble.scalar.Frequency capacity)
Set the link capacity.
|
String |
toString() |
public OTSLink(String id, OTSNode startNode, OTSNode endNode, LinkType linkType, OTSLine3D designLine, org.djunits.value.vdouble.scalar.Frequency capacity)
id - the link idstartNode - start node (directional)endNode - end node (directional)linkType - Link type to indicate compatibility with GTU typesdesignLine - the OTSLine3D design line of the Linkcapacity - link capacity in GTUs per hourpublic OTSLink(String id, OTSNode startNode, OTSNode endNode, LinkType linkType, OTSLine3D designLine)
id - the link idstartNode - start node (directional)endNode - end node (directional)linkType - Link type to indicate compatibility with GTU typesdesignLine - the OTSLine3D design line of the Linkpublic final OTSNode getStartNode()
getStartNode in interface Linkpublic final OTSNode getEndNode()
getEndNode in interface Linkpublic final LinkType getLinkType()
getLinkType in interface Linkpublic final org.djunits.value.vdouble.scalar.Frequency getCapacity()
getCapacity in interface Linkpublic final void setCapacity(org.djunits.value.vdouble.scalar.Frequency capacity)
setCapacity in interface Linkcapacity - the new capacity of the link as a frequency in GTUs per time unit.public final OTSLine3D getDesignLine()
getDesignLine in interface Linkpublic final org.djunits.value.vdouble.scalar.Length.Rel getLength()
public final DirectedPoint getLocation()
getLocation in interface LocatableInterfacegetLocation in interface Linkpublic final Bounds getBounds()
getBounds in interface LocatableInterfacegetBounds in interface LinkCopyright © 2014–2015 Delft University of Technology. All rights reserved.