HERE Android SDK Developer's Guide

Category

The class Category is a member of com.here.android.mpa.search .

Class Summary

public class Category

extends java.lang.Object

Represents a category with which a Place can be associated.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in Category
Nested Classes

public static final enumeration Category.Global

Represents a set of fixed category filters on the resources of the Places search service.

Method Summary

Table 2. Methods in Category
Methods

public boolean equals (Object obj)

For documentation, see java.lang.Object

public String getIconUrl ()

Gets the URL to retrieve the icon for the Category .

public String getId ()

Gets the unique identifier for the Category .

public String getName ()

Gets the localized display name for the Category .

public Category getParent ()

Gets the parent Category for the Category .

public java.util.List <Category> getSubCategories ()

Gets the list of subcategories for the Category .

public static java.util.List <Category> globalCategories ()

Return the localized Global categories for Places search.

public static Category globalCategory (Global type)

Return the localized Global category for Places search.

public int hashCode ()

For documentation, see java.lang.Object

Class Details

Represents a category with which a Place can be associated.

Method Details

public boolean equals (Object obj)

For documentation, see java.lang.Object

Parameters:

  • obj

public String getIconUrl ()

Gets the URL to retrieve the icon for the Category .

Returns:

The icon URL

public String getId ()

Gets the unique identifier for the Category .

Returns:

The unique ID

public String getName ()

Gets the localized display name for the Category .

Returns:

Localized display name

public Category getParent ()

Gets the parent Category for the Category .

Note: The category can already be a parent Category , in which case this method would return itself.

Returns:

Parent Category

public java.util.List <Category> getSubCategories ()

Gets the list of subcategories for the Category .

Note: a Category might have no subcategories, in which case this method would return empty .

Returns:

The list of Category objects representing the subcategories (could be empty)

public static java.util.List <Category> globalCategories ()

Return the localized Global categories for Places search. Note: The list of categories is cached. The update request to Places backend is made periodically and when device locale is changed. If there is no cache or cache is being updated, an empty list is returned. User should try again later.

Returns:

A list of localized global Category instances if available, empty otherwise.

public static Category globalCategory (Global type)

Return the localized Global category for Places search. Note: The list of categories is cached. The update request to Places backend is made periodically and when device locale is changed. If there is no cache or cache is being updated, an empty list is returned. User should try again later.

Parameters:

  • type

    The Global type.

Returns:

The localized Global Category instances.

public int hashCode ()

For documentation, see java.lang.Object