Package org.opentrafficsim.kpi.sampling
Class KpiDirectedLanePosition
java.lang.Object
org.opentrafficsim.kpi.sampling.KpiDirectedLanePosition
- All Implemented Interfaces:
 java.io.Serializable
public class KpiDirectedLanePosition
extends java.lang.Object
implements java.io.Serializable
Store one position, direction and lane of a GTU.
 
 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 KpiDirectedLanePosition(LaneDataInterface lane, Length position, KpiGtuDirectionality gtuDirection)Construct a new DirectedLanePosition. - 
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)KpiGtuDirectionalitygetKpiGtuDirection()Retrieve the gtuDirection.LaneDataInterfacegetLaneData()Retrieve the lane.LengthgetPosition()Retrieve the position on the lane.inthashCode()java.lang.StringtoString() 
- 
Constructor Details
- 
KpiDirectedLanePosition
public KpiDirectedLanePosition(LaneDataInterface lane, Length position, KpiGtuDirectionality gtuDirection)Construct a new DirectedLanePosition.- Parameters:
 lane- LaneDataInterface; the lane for the positionposition- Length; the position on the lane, relative to the cross section link (design line)gtuDirection- KpiGtuDirectionality; the direction the vehicle is driving to -- either in the direction of the design line, or against it
 
 - 
 - 
Method Details
- 
getLaneData
Retrieve the lane.- Returns:
 - LaneDataInterface; the lane for the position
 
 - 
getPosition
Retrieve the position on the lane.- Returns:
 - Length; the position on the lane, relative to the cross section link (design line)
 
 - 
getKpiGtuDirection
Retrieve the gtuDirection.- Returns:
 - KpiGtuDirectionality; gtuDirection the direction the vehicle is driving to -- either in the direction of the design line, or against it
 
 - 
hashCode
public int hashCode()- Overrides:
 hashCodein classjava.lang.Object
 - 
equals
public boolean equals(java.lang.Object obj)- Overrides:
 equalsin classjava.lang.Object
 - 
toString
public java.lang.String toString()- Overrides:
 toStringin classjava.lang.Object
 
 -