Interface RoadSideDistraction.DistractionProfile

All Known Implementing Classes:
RoadSideDistraction.TrapezoidProfile
Enclosing class:
RoadSideDistraction
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface RoadSideDistraction.DistractionProfile
Describes the profile around the distraction.

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
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the level of distraction at the given distance.
  • Method Details

    • getDistraction

      OptionalDouble getDistraction(Length distance)
      Returns the level of distraction at the given distance.
      Parameters:
      distance - negative when approaching
      Returns:
      level of distraction (task-demand), empty if the distraction is no longer important