Class DynamicSpeedInfo
Package com.here.sdk.routing
Class DynamicSpeedInfo
- java.lang.Object
-
- com.here.sdk.routing.DynamicSpeedInfo
-
public final class DynamicSpeedInfo extends java.lang.ObjectProvides estimated speed information.
-
-
Field Summary
Fields Modifier and Type Field Description doublebaseSpeedInMetersPerSecondThe speed in meters per second without taking traffic into consideration.doubletrafficSpeedInMetersPerSecondThe speed in meters per second considering traffic.intturnTimeInSecondsThe time it takes to make a turn, represented in seconds.
-
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 doublecalculateJamFactor()Calculates the traffic jam factor that shows the traffic condition in a numeric way.booleanequals(java.lang.Object obj)inthashCode()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.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.
-
-