public class Link extends Object
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
Link(Node n1,
Node n2,
List<Tag> lt,
double length) |
Link(Node n1,
Node n2,
List<Tag> lt,
double length,
byte lanes,
byte flanes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSpline(Node spline)
Append a Node to the spline of this Link.
|
void |
addTag(Tag tag)
Add a Tag to this Link.
|
Node |
getEnd() |
byte |
getForwardLanes() |
String |
getID() |
byte |
getLanes() |
double |
getLength() |
List<Node> |
getSplineList() |
Node |
getStart() |
List<Tag> |
getTags() |
boolean |
hasTag(String key)
Returns true if the link has a Tag with the specified key.
|
boolean |
isOneway() |
void |
setEnd(Node end) |
void |
setForwardLanes(byte forwardLanes)
Set the number of forward lanes of this Link.
|
void |
setLanes(byte lanes) |
void |
setLength(double length) |
void |
setOneway(boolean oneway) |
void |
setSplineList(List<Node> splineList) |
void |
setStart(Node start) |
void |
setTags(List<Tag> lt) |
String |
toString() |
public Link(Node n1, Node n2, List<Tag> lt, double length)
n1 - Startnoden2 - Endnodelt - List of inherited Waytagslength - length of the linkpublic final String getID()
public final Node getStart()
public final void setStart(Node start)
start - set start.public final Node getEnd()
public final void setEnd(Node end)
end - set end.public final boolean isOneway()
public final void setOneway(boolean oneway)
oneway - set if link is one way.public final byte getLanes()
public final byte getForwardLanes()
public final void setLanes(byte lanes)
lanes - set lanes.public final void setForwardLanes(byte forwardLanes)
forwardLanes - byte; the number of forward lanespublic final void addTag(Tag tag)
tag - Tag; the Tag that must be addedpublic final double getLength()
public final void setLength(double length)
length - set length.public final void setSplineList(List<Node> splineList)
splineList - set splineList.public final void addSpline(Node spline)
spline - Node; the Node to add to the splineListpublic final boolean hasTag(String key)
key - Copyright © 2014–2015 Delft University of Technology. All rights reserved.