Class SuggestItem

com.yandex.mapkit.search

java.lang.Object ⇽ SuggestItem

public class SuggestItem

A single suggested item.

Nested Classes

Constructors

SuggestItem()

Use constructor with parameters in your code.

SuggestItem(@NonNull Type type, @NonNull SpannableString title, @Nullable SpannableString subtitle, @NonNull List< String > tags, @NonNull String searchText, @Nullable String displayText, @Nullable String uri, @Nullable LocalizedValue distance, boolean isPersonal, @NonNull Action action, @Nullable String logId, boolean isOffline, boolean isWordItem)

Methods

synchronized Action getAction()

Action to perform on click/tap/enter.

synchronized String getDisplayText()

Text to display if searchText is too technical to display.

synchronized LocalizedValue getDistance()

Optional distance localized value.

synchronized boolean getIsOffline()

Item is from offline search.

synchronized boolean getIsPersonal()

If the suggested item respects personalization.

synchronized boolean getIsWordItem()

Item is a word suggest item.

synchronized String getLogId()

Id for request logging.

String getNativeName()
synchronized String getSearchText()

Text to search for.

synchronized SpannableString getSubtitle()

If type is TOPONYM returns reversed toponym hierarchy, if type is BUSINESS returns business address.

synchronized List< String > getTags()

Additional free-form data for suggest item.

synchronized SpannableString getTitle()

Short object name.

synchronized Type getType()

Suggested object type.

synchronized String getUri()

Element uri, if applicable.

void serialize(Archive archive)

Constructor Detail

SuggestItem

public SuggestItem ()

Use constructor with parameters in your code.

This one is for serialization only!

SuggestItem

public SuggestItem (@NonNull Type type, @NonNull SpannableString title, @Nullable SpannableString subtitle, @NonNull List< String > tags, @NonNull String searchText, @Nullable String displayText, @Nullable String uri, @Nullable LocalizedValue distance, boolean isPersonal, @NonNull Action action, @Nullable String logId, boolean isOffline, boolean isWordItem)

Method Detail

getAction

public synchronized Action getAction ()

Action to perform on click/tap/enter.

getDisplayText

public synchronized String getDisplayText ()

Text to display if searchText is too technical to display.

Optional field, can be null.

getDistance

public synchronized LocalizedValue getDistance ()

Optional distance localized value.

Optional field, can be null.

getIsOffline

public synchronized boolean getIsOffline ()

Item is from offline search.

getIsPersonal

public synchronized boolean getIsPersonal ()

If the suggested item respects personalization.

getIsWordItem

public synchronized boolean getIsWordItem ()

Item is a word suggest item.

getLogId

public synchronized String getLogId ()

Id for request logging.

Optional field, can be null.

getNativeName

public static String getNativeName ()

getSearchText

public synchronized String getSearchText ()

Text to search for.

getSubtitle

public synchronized SpannableString getSubtitle ()

If type is TOPONYM returns reversed toponym hierarchy, if type is BUSINESS returns business address.

Optional field, can be null.

getTags

public synchronized List< String > getTags ()

Additional free-form data for suggest item.

If type is TOPONYM, returns toponym kind (house/street/locality/...). If type is BUSINESS, returns category class (drugstores/restaurants/...).

getTitle

public synchronized SpannableString getTitle ()

Short object name.

getType

public synchronized Type getType ()

Suggested object type.

getUri

public synchronized String getUri ()

Element uri, if applicable.

Optional field, can be null.

serialize

public void serialize (Archive archive)