HERE Android SDK Developer's Guide

Link

The class Link is a member of com.here.android.mpa.urbanmobility .

Class Summary

public final class Link

extends java.lang.Object

Represents a link which can be associated with operator, transit alert or a ticket.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in Link
Nested Classes

public static final enumeration Link.LinkType

Type of the link as enum for convenient use.

Method Summary

Table 2. Methods in Link
Methods

public boolean equals (Object o)

public String getText ()

Gets the link text.

public LinkType getType ()

Gets the link type, i.e.

public String getUrl ()

Gets the URL of the link.

public String getUrlText ()

Gets clickable part of text.

public int hashCode ()

Class Details

Represents a link which can be associated with operator, transit alert or a ticket. For example, a link to the transit operator's website. This information must be exposed in the client application.

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

Method Details

public boolean equals (Object o)

Parameters:

  • o

public String getText ()

Gets the link text.

Returns:

link text.

public LinkType getType ()

Gets the link type, i.e. is it link to agency web-site or logo or a ticket booking link.

Returns:

the link type

public String getUrl ()

Gets the URL of the link.

Returns:

URL of the link

public String getUrlText ()

Gets clickable part of text. If not available (empty string) the full text need to be clickable. For example if getText() returns "Lorem ipsum dolor sit amet, consectetur adipiscing elit." and getUrlText() returns "Lorem ipsum" then only "Lorem ipsum" part should be clickable.

Returns:

clickable part of text, or empty string if not available

public int hashCode ()