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
Storage for a Link and a GTUDirectionality.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
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) -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)GTUDirectionalitygetDirection()StringgetId()LengthgetLength()LinkgetLink()LinkTypegetLinkType()NodegetNodeFrom()NodegetNodeTo()inthashCode()StringtoString()
-
Constructor Details
-
LinkDirection
- Parameters:
link- Link; the linkdirection- GTUDirectionality; the direction on the link, with or against the design line
-
-
Method Details
-
getLink
- Returns:
- link
-
getId
- Returns:
- String; link id
- See Also:
Link.getId()
-
getLinkType
- Returns:
- LinkType; link type
- See Also:
Link.getLinkType()
-
getLength
- Returns:
- Length; length
- See Also:
Link.getLength()
-
getDirection
- Returns:
- direction
-
getNodeTo
- Returns:
- the destination node of the linkdirection
-
getNodeFrom
- Returns:
- the origin node of the linkdirection
-
hashCode
public int hashCode() -
equals
-
toString
-