Важно

This feature is available in the Full MapKit SDK version

Package com.yandex.mapkit.search

Class SuggestItem

java.lang.Object
    ↳ com.yandex.mapkit.search.SuggestItem

class SuggestItem implements Serializable

A single suggested item.

Nested Class Summary

Modifier and Type

Interface

Description

static final

Type

Suggest item type.

static final

Action

Action to be performed when user selected suggest item.

Summary

Constructors

Signature and Description

SuggestItem()
Use constructor with parameters in your code.

SuggestItem(@NonNull Type type,
            @NonNull SpannableString title,
            @Nullable SpannableString subtitle,
            @NonNull java.util.List<java.lang.String> tags,
            @NonNull java.lang.String searchText,
            @Nullable java.lang.String displayText,
            @Nullable java.lang.String uri,
            @Nullable LocalizedValue distance,
            boolean isPersonal,
            @NonNull Action action,
            @Nullable java.lang.String logId,
            boolean isOffline,
            boolean isWordItem,
            @NonNull java.util.List<KeyValuePair> properties,
            @Nullable Point center)

Methods

Type and modifiers

Method and Description

synchronized Type

getType()
Suggested object type.

synchronized SpannableString

getTitle()
Short object name.

synchronized SpannableString

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

synchronized java.util.List<java.lang.String>

getTags()
Additional free-form data for suggest item.

synchronized java.lang.String

getSearchText()
Text to search for.

synchronized java.lang.String

getDisplayText()
Text to display if searchText is too technical to display.

synchronized java.lang.String

getUri()
Element uri, if applicable.

synchronized LocalizedValue

getDistance()
Optional distance localized value.

synchronized boolean

getIsPersonal()
If the suggested item respects personalization.

synchronized Action

getAction()
Action to perform on click/tap/enter.

synchronized java.lang.String

getLogId()
Id for request logging.

synchronized boolean

getIsOffline()
Item is from offline search.

synchronized boolean

getIsWordItem()
Item is a word suggest item.

synchronized java.util.List<KeyValuePair>

getProperties()
Additional item properties.

synchronized Point

getCenter()
Position of object.

void

serialize(com.yandex.runtime.bindings.Archive archive)

static java.lang.String

getNativeName()

Constuctors

SuggestItem

SuggestItem()

Use constructor with parameters in your code.

This one is for serialization only!


SuggestItem

SuggestItem(@NonNull Type type,
            @NonNull SpannableString title,
            @Nullable SpannableString subtitle,
            @NonNull java.util.List<java.lang.String> tags,
            @NonNull java.lang.String searchText,
            @Nullable java.lang.String displayText,
            @Nullable java.lang.String uri,
            @Nullable LocalizedValue distance,
            boolean isPersonal,
            @NonNull Action action,
            @Nullable java.lang.String logId,
            boolean isOffline,
            boolean isWordItem,
            @NonNull java.util.List<KeyValuePair> properties,
            @Nullable Point center)


Methods

getType

@NonNull
Type getType()

Suggested object type.


getTitle

@NonNull
SpannableString getTitle()

Short object name.


getSubtitle

@Nullable
SpannableString getSubtitle()

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

Optional field, can be null.


getTags

@NonNull
java.util.List<java.lang.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/...).


getSearchText

@NonNull
java.lang.String getSearchText()

Text to search for.


getDisplayText

@Nullable
java.lang.String getDisplayText()

Text to display if searchText is too technical to display.

Optional field, can be null.


getUri

@Nullable
java.lang.String getUri()

Element uri, if applicable.

Optional field, can be null.


getDistance

@Nullable
LocalizedValue getDistance()

Optional distance localized value.

Optional field, can be null.


getIsPersonal

boolean getIsPersonal()

If the suggested item respects personalization.


getAction

@NonNull
Action getAction()

Action to perform on click/tap/enter.


getLogId

@Nullable
java.lang.String getLogId()

Id for request logging.

Optional field, can be null.


getIsOffline

boolean getIsOffline()

Item is from offline search.


getIsWordItem

boolean getIsWordItem()

Item is a word suggest item.


getProperties

@NonNull
java.util.List<KeyValuePair> getProperties()

Additional item properties.


getCenter

@Nullable
Point getCenter()

Position of object.

Optional field, can be null.


serialize

@Override
void serialize(com.yandex.runtime.bindings.Archive archive)


getNativeName

java.lang.String getNativeName()


Предыдущая
Следующая