HERE Android SDK Developer's Guide

TollCostVehicleProfile

The class TollCostVehicleProfile is a member of com.here.android.mpa.tce .

Class Summary

public final class TollCostVehicleProfile

extends java.lang.Object

Specify vehicle parameters to calculate toll cost.

[For complete information, see the section Class Details]

See also:

setVehicleProfile(TollCostVehicleProfile)

Nested Class Summary

Table 1. Nested Classes in TollCostVehicleProfile
Nested Classes

public static final enumeration TollCostVehicleProfile.EmissionType

Vehicle emission type.

public static final enumeration TollCostVehicleProfile.Hybrid

Vehicle running mode.

public static final enumeration TollCostVehicleProfile.ShippedHazardousGoods

Shipped Hazardous Goods

public static final enumeration TollCostVehicleProfile.TrailerType

Trailer Type.

public static final enumeration TollCostVehicleProfile.TrailersCount

Trailers count.

public static final enumeration TollCostVehicleProfile.VehicleType

Represent different Vehicle types.

Constructor Summary

Table 2. Constructors in TollCostVehicleProfile
Constructors

TollCostVehicleProfile ()

public constructor

Method Summary

Table 3. Methods in TollCostVehicleProfile
Methods

public boolean equals (Object obj)

public EmissionType getEmissionType ()

Gets vehicle emission type.

public double getHeight ()

Gets vehicle height in meters.

public int getHeightAbove1stAxle ()

Gets height above 1st axle in meters.

public Hybrid getHybridMode ()

Gets vehicle running mode.

public double getLimitedWeight ()

Gets total weight of the vehicle including trailer(s) or caravan in tonne.

public int getPassengersCount ()

Gets number of passengers can fit in vehicle.

public ShippedHazardousGoods getShippedHazardousGoods ()

Gets hazardous goods transported in the vehicle.

public int getTiresCount ()

Gets vehicle's tires count.

public TrailersCount getTrailerCount ()

Gets trailer count.

public double getTrailerHeight ()

Gets trailer height in meters.

public int getTrailerNumberAxles ()

Gets number of trailer's axles.

public TrailerType getTrailerType ()

Gets trailer type.

public int getVehicleAxles ()

Gets number of vehicle's axles (not including trailer axles).

public VehicleType getVehicleType ()

Gets vehicle type.

public double getWeight ()

Gets vehicle weight in tonne.

public int hashCode ()

public boolean isCommercial ()

Gets if the vehicle is designed for commercial use.

public boolean isDisabledEquipped ()

Gets if the vehicle is specially equipped for transporting disabled people.

public TollCostVehicleProfile setCommercial (boolean commercial)

Sets if the vehicle is designed for commercial use.

public void setDisabledEquipped (boolean enable)

Sets if the vehicle is specially equipped for transporting disabled people.

public TollCostVehicleProfile setEmissionType (EmissionType emissionType)

Sets vehicle emission type.

public TollCostVehicleProfile setHeight (double height)

Sets vehicle height in meters.

public TollCostVehicleProfile setHeightAbove1stAxle (int heightAbove1stAxle)

Sets height above 1st axle in meters.

public TollCostVehicleProfile setHybridMode (Hybrid hybridMode)

Sets vehicle running mode.

public TollCostVehicleProfile setLimitedWeight (double limitedWeight)

Sets total weight of the vehicle including trailer(s) or caravan in tonne.

public TollCostVehicleProfile setPassengersCount (int passengersCount)

Set number of passengers can fit in vehicle.

public TollCostVehicleProfile setShippedHazardousGoods (ShippedHazardousGoods shippedHazardousGoods)

Sets hazardous goods transported in the vehicle.

public TollCostVehicleProfile setTiresCount (int tiresCount)

Sets vehicle's tires count.

public TollCostVehicleProfile setTrailerCount (TrailersCount trailerCount)

Sets trailer count.

public TollCostVehicleProfile setTrailerHeight (double trailerHeight)

Sets trailer height in meters.

public TollCostVehicleProfile setTrailerNumberAxles (int trailerNumberAxles)

Sets number of trailer's axles.

public TollCostVehicleProfile setTrailerType (TrailerType trailerType)

Sets trailer type.

public TollCostVehicleProfile setVehicleAxles (int axles)

Sets number of vehicle's axles (not including trailer axles).

public TollCostVehicleProfile setVehicleType (VehicleType vehicleType)

Sets vehicle type.

public TollCostVehicleProfile setWeight (double weight)

Sets vehicle weight in tonne.

Class Details

Specify vehicle parameters to calculate toll cost. This class can be used to create TollCostOptions that can be further used in TollCostRequest to make request for toll cost .

See also:

setVehicleProfile(TollCostVehicleProfile)

Constructor Details

TollCostVehicleProfile ()

public constructor

Method Details

public boolean equals (Object obj)

Parameters:

  • obj

public EmissionType getEmissionType ()

Gets vehicle emission type. Default is NONE.

Returns:

vehicle emission type.

public double getHeight ()

Gets vehicle height in meters.

Returns:

vehicle's height.

public int getHeightAbove1stAxle ()

Gets height above 1st axle in meters.

Returns:

height above 1st axle.

public Hybrid getHybridMode ()

Gets vehicle running mode. Default is NONE.

Returns:

vehicle running mode.

public double getLimitedWeight ()

Gets total weight of the vehicle including trailer(s) or caravan in tonne.

Returns:

total weight of the vehicle including trailer(s) or caravan in tonne.

public int getPassengersCount ()

Gets number of passengers can fit in vehicle. Default is 1 .

Returns:

number of passengers can fit in vehicle.

public ShippedHazardousGoods getShippedHazardousGoods ()

Gets hazardous goods transported in the vehicle. Default is NONE.

Returns:

hazardous goods transported in the vehicle.

public int getTiresCount ()

Gets vehicle's tires count. Default is 4 .

Returns:

vehicle's tires count.

public TrailersCount getTrailerCount ()

Gets trailer count. Default is VEHICLE_WITHOUT_TRAILER.

Returns:

Trailer count.

public double getTrailerHeight ()

Gets trailer height in meters.

Returns:

Trailer height in meters.

public int getTrailerNumberAxles ()

Gets number of trailer's axles. Default is 0 .

Returns:

Number of trailer's axles.

public TrailerType getTrailerType ()

Gets trailer type. Default is NONE.

Returns:

Trailer type.

public int getVehicleAxles ()

Gets number of vehicle's axles (not including trailer axles). Default is 2 .

Returns:

number of vehicle's axles.

public VehicleType getVehicleType ()

Gets vehicle type. Default is AUTO.

Returns:

vehicle type.

public double getWeight ()

Gets vehicle weight in tonne.

Returns:

vehicle weight in tonne.

public int hashCode ()

public boolean isCommercial ()

Gets if the vehicle is designed for commercial use. Default is false .

Returns:

if the vehicle is designed for commercial use

public boolean isDisabledEquipped ()

Gets if the vehicle is specially equipped for transporting disabled people.

Returns:

if the vehicle is specially equipped for transporting disabled people.

public TollCostVehicleProfile setCommercial (boolean commercial)

Sets if the vehicle is designed for commercial use. Default is false .

Parameters:

  • commercial

    if the vehicle is designed for commercial use

Returns:

updated instance for chaining.

public void setDisabledEquipped (boolean enable)

Sets if the vehicle is specially equipped for transporting disabled people. Default is false .

Parameters:

  • enable

    if the vehicle is specially equipped for transporting disabled people.

public TollCostVehicleProfile setEmissionType (EmissionType emissionType)

Sets vehicle emission type. Default is NONE.

Parameters:

  • emissionType

    vehicle emission type.

Returns:

updated instance for chaining.

public TollCostVehicleProfile setHeight (double height)

Sets vehicle height in meters.

Parameters:

  • height

    vehicle height in meters.

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if height is not greater than 0.

public TollCostVehicleProfile setHeightAbove1stAxle (int heightAbove1stAxle)

Sets height above 1st axle in meters.

Parameters:

  • heightAbove1stAxle

    height above 1st axle.

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if heightAbove1stAxle is not greater than 0.

public TollCostVehicleProfile setHybridMode (Hybrid hybridMode)

Sets vehicle running mode. Default is NONE.

Parameters:

  • hybridMode

    vehicle running mode.

Returns:

updated instance for chaining.

public TollCostVehicleProfile setLimitedWeight (double limitedWeight)

Sets total weight of the vehicle including trailer(s) or caravan in tonne.

Parameters:

  • limitedWeight

    total weight of the vehicle including trailer(s) or caravan in tonne.

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if limitedWeight is not greater than 0.

public TollCostVehicleProfile setPassengersCount (int passengersCount)

Set number of passengers can fit in vehicle. Default is 1 .

Parameters:

  • passengersCount

    number of passengers.

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if passengersCount is not greater than 0.

public TollCostVehicleProfile setShippedHazardousGoods (ShippedHazardousGoods shippedHazardousGoods)

Sets hazardous goods transported in the vehicle. Default is NONE.

Parameters:

  • shippedHazardousGoods

    hazardous goods transported in the vehicle.

Returns:

updated instance for chaining.

public TollCostVehicleProfile setTiresCount (int tiresCount)

Sets vehicle's tires count. Default is 4 .

Parameters:

  • tiresCount

    tires count.

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if tiresCount is not greater than 0.

public TollCostVehicleProfile setTrailerCount (TrailersCount trailerCount)

Sets trailer count. Default is VEHICLE_WITHOUT_TRAILER.

Note - setTrailerType(TollCostVehicleProfile.TrailerType), setTrailerHeight(double) and setTrailerNumberAxles(int) should also be set otherwise TollCostError will be reported while making request.

Parameters:

  • trailerCount

    number of trailer.

Returns:

updated instance for chaining.

public TollCostVehicleProfile setTrailerHeight (double trailerHeight)

Sets trailer height in meters.

Note - setTrailerType(TollCostVehicleProfile.TrailerType), setTrailerCount(TollCostVehicleProfile.TrailersCount) and setTrailerNumberAxles(int) should also be set otherwise TollCostError will be reported while making request.

Parameters:

  • trailerHeight

    trailer height.

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if trailerHeight is not greater than 0.

See also:

setTrailerType(TrailerType)

public TollCostVehicleProfile setTrailerNumberAxles (int trailerNumberAxles)

Sets number of trailer's axles.

Note - setTrailerType(TollCostVehicleProfile.TrailerType), setTrailerHeight(double) and setTrailerCount(TollCostVehicleProfile.TrailersCount) should also be set otherwise TollCostError will be reported while making request.

Parameters:

  • trailerNumberAxles

    number of trailer's axles.

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if trailerNumberAxles is not greater than 0.

See also:

setTrailerType(TrailerType)

public TollCostVehicleProfile setTrailerType (TrailerType trailerType)

Sets trailer type. Default is NONE.

Note - setTrailerCount(TollCostVehicleProfile.TrailersCount), setTrailerHeight(double) and setTrailerNumberAxles(int) should also be set, if Trailer type is not NONE otherwise TollCostError will be reported while making request.

Parameters:

  • trailerType

    trailer Type

Returns:

updated instance for chaining.

public TollCostVehicleProfile setVehicleAxles (int axles)

Sets number of vehicle's axles (not including trailer axles). Default is 2 .

Parameters:

  • axles

    vehicle's axles

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if axles is not greater than 0.

public TollCostVehicleProfile setVehicleType (VehicleType vehicleType)

Sets vehicle type. Default is AUTO.

Parameters:

  • vehicleType

    vehicle type.

Returns:

updated instance for chaining.

public TollCostVehicleProfile setWeight (double weight)

Sets vehicle weight in tonne.

Parameters:

  • weight

    vehicle weight.

Returns:

updated instance for chaining.

Throws:

  • IllegalArgumentException

    if weight is not greater than 0.