HERE Android SDK Developer's Guide

TrafficScale

The class TrafficScale is a member of com.here.android.mpa.routing.ConsumptionParameters.

Class Summary

public static final class ConsumptionParameters.TrafficScale

extends java.lang.Object

Defines the traffic speed/free-flow speed adjustment scale.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in TrafficScale
Constructors

TrafficScale (double ratio, double coefficient)

Method Summary

Table 2. Methods in TrafficScale
Methods

public boolean equals (Object o)

public double getRatio ()

Gets the ratio between traffic_speed and free_flow_speed

public double getСoefficient ()

Gets coefficient that will be used to adjust consumption according to the traffic_speed/free_flow_speed ratio

public int hashCode ()

Class Details

Defines the traffic speed/free-flow speed adjustment scale. Scale will be used when calculating consumption for a segment that contains traffic information. Setting this scale allows the definition of how the ratio between the speed parameters (see getSpeedParameters()) and traffic speed parameters (see getTrafficSpeedParameters()) influence the consumption.

Constructor Details

TrafficScale (double ratio, double coefficient)

Parameters:

  • ratio
  • coefficient

Method Details

public boolean equals (Object o)

Parameters:

  • o

public double getRatio ()

Gets the ratio between traffic_speed and free_flow_speed

Returns:

ratio between traffic_speed and free_flow_speed

public double getСoefficient ()

Gets coefficient that will be used to adjust consumption according to the traffic_speed/free_flow_speed ratio

Returns:

coefficient

public int hashCode ()