Package org.opentrafficsim.core.network
Class DirectedLinkPosition
- java.lang.Object
-
- org.opentrafficsim.core.network.LinkDirection
-
- org.opentrafficsim.core.network.DirectedLinkPosition
-
- All Implemented Interfaces:
Serializable
public class DirectedLinkPosition extends LinkDirection
Directed link position.Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 22 okt. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DirectedLinkPosition(Link link, double fractionalLongitudinalPosition, GTUDirectionality direction)
DirectedLinkPosition(Link link, Length position, GTUDirectionality direction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getFractionalLongitudinalPosition()
Length
getLongitudinalPosition()
String
toString()
-
Methods inherited from class org.opentrafficsim.core.network.LinkDirection
equals, getDirection, getId, getLength, getLink, getLinkType, getNodeFrom, getNodeTo, hashCode
-
-
-
-
Constructor Detail
-
DirectedLinkPosition
public DirectedLinkPosition(Link link, double fractionalLongitudinalPosition, GTUDirectionality direction)
- Parameters:
link
- Link; the linkfractionalLongitudinalPosition
- double; fractional positiondirection
- GTUDirectionality; the direction on the link, with or against the design line
-
DirectedLinkPosition
public DirectedLinkPosition(Link link, Length position, GTUDirectionality direction)
- Parameters:
link
- Link; the linkposition
- Length; positiondirection
- GTUDirectionality; the direction on the link, with or against the design line
-
-
Method Detail
-
getFractionalLongitudinalPosition
public final double getFractionalLongitudinalPosition()
- Returns:
- fractionalLongitudinalPosition.
-
getLongitudinalPosition
public final Length getLongitudinalPosition()
- Returns:
- position as a length as a traveled length on this link.
-
toString
public String toString()
- Overrides:
toString
in classLinkDirection
-
-