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-2020 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
Modifier and Type Method Description doublegetFractionalLongitudinalPosition()LengthgetLongitudinalPosition()StringtoString()Methods inherited from class org.opentrafficsim.core.network.LinkDirection
equals, getDirection, getId, getLength, getLink, getLinkType, getNodeFrom, getNodeTo, hashCode
-
Constructor Details
-
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
- Parameters:
link- Link; the linkposition- Length; positiondirection- GTUDirectionality; the direction on the link, with or against the design line
-
-
Method Details
-
getFractionalLongitudinalPosition
public final double getFractionalLongitudinalPosition()- Returns:
- fractionalLongitudinalPosition.
-
getLongitudinalPosition
- Returns:
- position as a length as a traveled length on this link.
-
toString
- Overrides:
toStringin classLinkDirection
-