Skip to content

Class Location

Pavel Tychinin edited this page Mar 27, 2024 · 6 revisions

Location class is used for storing location parameters: identifier, version, name, a list of sublocations, etc. Location instance can be obtained from LocationManager using LocationListeners' callback, when the location is loaded.

Referenced from: LocationManager.

Public methods

Function getId

public abstract int getId();

Function returns location's identifier.

Function getVersion

public abstract int getVersion();

Function returns location's version.

Function getName

public abstract String getName();

Function returns location's name.

Function getDescript

public abstract String getDescript();

Function returns location's description.

Function getSublocations

public abstract ArrayList<Sublocation> getSublocations();

Function returns list of sublocations (see Sublocation class).

Function getCategories

public abstract ArrayList<Category> getCategories();

Function returns list of venue categories defined for the location (see Category class).

Function getSublocationById

public Sublocation getSublocationById(int id)

Function is used for obtaining a sublocation with the specified identifier from the current location.

Parameters
  • id — the sublocation identifier.
Return value

The Sublocation of the current location with the specified identifier, if it exists. If sublocation with the specified identifier doesn't exist, function returns null.

Function getCategoryById

public Category getCategoryById(int id)

Function is used for obtaining a category with the specified identifier from the current location.

Parameters
  • id — the category identifier.
Return value

The Category of the current location with the specified identifier, if it exists. If category with the specified identifier doesn't exist, function returns null.

Clone this wiki locally