Package org.opentrafficsim.core.network
Class LinkDirection
- java.lang.Object
-
- org.opentrafficsim.core.network.LinkDirection
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DirectedLinkPosition
public class LinkDirection extends Object implements Serializable
A LinkDirection packs a Link and a GTUDirectionality.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Dec 2, 2015
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LinkDirection(Link link, GtuDirectionality direction)Construct a new LinkDirection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)GtuDirectionalitygetDirection()Retrieve the direction of the link.StringgetId()Retrieve the id of the link.LengthgetLength()Retrieve the length of the link.LinkgetLink()Retrieve the link.LinkTypegetLinkType()Retrieve the link type of the link.NodegetNodeFrom()Retrieve the origin node of this LinkDirection.NodegetNodeTo()Retrieve the destination node of this LinkDirection.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
LinkDirection
public LinkDirection(Link link, GtuDirectionality direction)
Construct a new LinkDirection.- Parameters:
link- Link; the linkdirection- GtuDirectionality; the direction on the link, with or against the design line
-
-
Method Detail
-
getLink
public final Link getLink()
Retrieve the link.- Returns:
- Link; the link
-
getId
public String getId()
Retrieve the id of the link.- Returns:
- String; link id
- See Also:
Link.getId()
-
getLinkType
public LinkType getLinkType()
Retrieve the link type of the link.- Returns:
- LinkType; link type
- See Also:
Link.getLinkType()
-
getLength
public Length getLength()
Retrieve the length of the link.- Returns:
- Length; the length of the link
- See Also:
Link.getLength()
-
getDirection
public final GtuDirectionality getDirection()
Retrieve the direction of the link.- Returns:
- GTUDirectionality; the direction of the link
-
getNodeTo
public final Node getNodeTo()
Retrieve the destination node of this LinkDirection.- Returns:
- Node; the destination node of this LinkDirection
-
getNodeFrom
public final Node getNodeFrom()
Retrieve the origin node of this LinkDirection.- Returns:
- Node; the origin node of the LinkDirection
-
-