Class NeighborsUtil.DistanceGTU
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.perception.categories.neighbors.NeighborsUtil.DistanceGTU
-
- All Implemented Interfaces:
Comparable<NeighborsUtil.DistanceGTU>
- Enclosing class:
- NeighborsUtil
public static class NeighborsUtil.DistanceGTU extends Object implements Comparable<NeighborsUtil.DistanceGTU>
GTU at a distance, as preliminary info towards perceiving it. For instance, as a set from a search algorithm.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 apr. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Constructor Summary
Constructors Constructor Description DistanceGTU(LaneBasedGTU gtu, Length distance)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(NeighborsUtil.DistanceGTU o)
Length
getDistance()
Returns the distance.LaneBasedGTU
getGTU()
Returns the GTU.
-
-
-
Constructor Detail
-
DistanceGTU
DistanceGTU(LaneBasedGTU gtu, Length distance)
Constructor.- Parameters:
gtu
- LaneBasedGTU; GTUdistance
- Length; distance
-
-
Method Detail
-
getGTU
public LaneBasedGTU getGTU()
Returns the GTU.- Returns:
- LaneBasedGTU; GTU
-
getDistance
public Length getDistance()
Returns the distance.- Returns:
- Length; distance
-
compareTo
public int compareTo(NeighborsUtil.DistanceGTU o)
- Specified by:
compareTo
in interfaceComparable<NeighborsUtil.DistanceGTU>
-
-