Class DynamicSpeedInfo

  • java.lang.Object
    • com.here.sdk.routing.DynamicSpeedInfo

  • public final class DynamicSpeedInfo
    extends java.lang.Object

    Provides estimated speed information.

    • Constructor Summary

      Constructors 
      Constructor Description
      DynamicSpeedInfo​(double baseSpeedInMetersPerSecond, double trafficSpeedInMetersPerSecond, int turnTimeInSeconds)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double calculateJamFactor()
      Calculates the traffic jam factor that shows the traffic condition in a numeric way.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • baseSpeedInMetersPerSecond

        public double baseSpeedInMetersPerSecond

        The speed in meters per second without taking traffic into consideration.

      • trafficSpeedInMetersPerSecond

        public double trafficSpeedInMetersPerSecond

        The speed in meters per second considering traffic.

      • turnTimeInSeconds

        public int turnTimeInSeconds

        The time it takes to make a turn, represented in seconds.

    • Constructor Detail

      • DynamicSpeedInfo

        public DynamicSpeedInfo​(double baseSpeedInMetersPerSecond,
                                double trafficSpeedInMetersPerSecond,
                                int turnTimeInSeconds)

        Creates a new instance.

        Parameters:
        baseSpeedInMetersPerSecond -

        The speed in meters per second without taking traffic into consideration.

        trafficSpeedInMetersPerSecond -

        The speed in meters per second considering traffic.

        turnTimeInSeconds -

        The time it takes to make a turn, represented in seconds.

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • calculateJamFactor

        public double calculateJamFactor()

        Calculates the traffic jam factor that shows the traffic condition in a numeric way.

        Returns:

        Returns calculated jam factor in the range [0.0, 10.0]. A large jamFactor value means more traffic jam in general. Specifically, 0.0 means free traffic and 10.0 means stationary traffic.