HERE Android SDK Developer's Guide

RoadElement

The class RoadElement is a member of com.here.android.mpa.common .

Class Summary

public class RoadElement

extends java.lang.Object

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in RoadElement
Nested Classes

public static final enumeration RoadElement.Attribute

Defined values for different road attributes

public static final enumeration RoadElement.FormOfWay

Form of Way Types

public static final enumeration RoadElement.PluralType

Plural type identifies when a Junction is made up of multiple Road Elements.

Method Summary

Table 2. Methods in RoadElement
Methods

public boolean equals (Object obj)

public java.util.EnumSet <Attribute> getAttributes ()

Gets the road attributes.

public int getAverageSpeed ()

Gets the average speed of the road element.

public FormOfWay getFormOfWay ()

Gets the form of way.

public java.util.List <GeoCoordinate> getGeometry ()

public double getGeometryLength ()

Returns the length of the polyline associated with this RoadElement in meters.

public int getNumberOfLanes ()

Gets number of lanes in this road element.

public PluralType getPluralType ()

Gets the plural type of the road element.

public String getRoadName ()

Gets the name of the road element.

public String getRouteName ()

Gets the route name of the road element.

public float getSpeedLimit ()

Gets the speed limit.

public Date getStartTime ()

Gets the (estimated) time at which this road element starts.

public int hashCode ()

public boolean isPedestrian ()

Checks, if the road is allowed only for pedestrians.

public boolean isPlural ()

Tests if the road element is plural.

Class Details

Method Details

public boolean equals (Object obj)

Parameters:

  • obj

public java.util.EnumSet <Attribute> getAttributes ()

Gets the road attributes.

Returns:

Set of roadAttributes

See also:

RoadElement.Attribute

public int getAverageSpeed ()

Gets the average speed of the road element.

Returns:

the average speed in m/s or 0 if the information is not available.

public FormOfWay getFormOfWay ()

Gets the form of way.

Returns:

the form of way of the road.

See also:

RoadElement.FormOfWay

public java.util.List <GeoCoordinate> getGeometry ()

public double getGeometryLength ()

Returns the length of the polyline associated with this RoadElement in meters.

Returns:

length of polyline for this RoadElement in meters.

public int getNumberOfLanes ()

Gets number of lanes in this road element.

Returns:

the number of lanes in this road element.

public PluralType getPluralType ()

Gets the plural type of the road element.

Returns:

The plural type of the road element.

See also:

RoadElement.PluralType

public String getRoadName ()

Gets the name of the road element. The method returns an empty string if the name is unknown.

Returns:

the name of the road.

public String getRouteName ()

Gets the route name of the road element. The route name is a short label for the road, for example I5 for the Interstate 5 in the US. The method returns an empty string if the route name is unknown.

Returns:

the route name of the road element.

public float getSpeedLimit ()

Gets the speed limit.

Returns:

the speed limit in m/s or 0 if the information is not available.

public Date getStartTime ()

Gets the (estimated) time at which this road element starts. If no departure time was set for the RouteOptions associated with this road element, than the time is relative to the system time when the route calculation took place. Otherwise, the times are relative to the specified departure time.

Returns:

The start time, or null if not available

See also:

setTime(Date, TimeType)

public int hashCode ()

public boolean isPedestrian ()

Checks, if the road is allowed only for pedestrians.

Returns:

true, if road is allowed only for pedestrians, otherwise false.

public boolean isPlural ()

Tests if the road element is plural.

Returns:

true if the road element is plural.