HERE Android SDK Developer's Guide

RouteConsumption

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

Class Summary

public final class RouteConsumption

extends java.lang.Object

Route consumptions.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in RouteConsumption
Constructors

RouteConsumption (List consumptionList, int firstAvailableConsumptionIndex)

Public constructor

Method Summary

Table 2. Methods in RouteConsumption
Methods

public int getConsumption (int elementIndex)

Provides the consumption for a route element.

public int getFirstAvailableConsumptionIndex ()

Provides the index of the first element with consumption available.

public int hashCode ()

For documentation, see java.lang.Object

Class Details

Route consumptions.

IMPORTANT: Consumption calculation is a Beta feature. The related classes are subject to change without notice.

Constructor Details

RouteConsumption (List consumptionList, int firstAvailableConsumptionIndex)

Public constructor

Parameters:

  • consumptionList

    The first element provides consumption for route element at first_available_consumption_index.

  • firstAvailableConsumptionIndex

    First element for which consumption was calculated

Throws:

  • IllegalArgumentException

    if consumptionList is null or empty.

Method Details

public int getConsumption (int elementIndex)

Provides the consumption for a route element. Returns zero when element_index is out of range or less then first available consumption index first_available_consumption_index

Parameters:

  • elementIndex

    Index of the route element

Returns:

Consumption value if available or '0' otherwise.

public int getFirstAvailableConsumptionIndex ()

Provides the index of the first element with consumption available.

Returns:

Index of the route element

public int hashCode ()

For documentation, see java.lang.Object

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.