Class LaneStructure.Entry<T extends LaneBasedObject>

java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.LaneStructure.Entry<T>
Type Parameters:
T - class of lane based object contained
All Implemented Interfaces:
Comparable<LaneStructure.Entry<T>>
Enclosing interface:
LaneStructure

public static class LaneStructure.Entry<T extends LaneBasedObject> extends Object implements Comparable<LaneStructure.Entry<T>>
Wrapper to hold lane-based object and it's distance.

Copyright (c) 2013-2024 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, Wouter Schakel
  • Constructor Details

    • Entry

      public Entry(org.djunits.value.vdouble.scalar.Length distance, T laneBasedObject)
      Parameters:
      distance - Length; distance to lane based object
      laneBasedObject - T; lane based object
  • Method Details

    • getDistance

      public final org.djunits.value.vdouble.scalar.Length getDistance()
      Returns:
      distance.
    • getLaneBasedObject

      public final T getLaneBasedObject()
      Returns:
      laneBasedObject.
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public final int compareTo(LaneStructure.Entry<T> arg)
      Specified by:
      compareTo in interface Comparable<T extends LaneBasedObject>
    • toString

      public final String toString()
      Overrides:
      toString in class Object