DefaultSearchResultItemState

class DefaultSearchResultItemState(val directoryObject: DirectoryObject, lastLocation: GeoPoint?) : SearchResultItemState

Default implementation of the SearchResultItemState interface.

Provides the logic for transforming a DirectoryObject into a state suitable for display in search results. It calculates derived properties and formats raw data for presentation.

Parameters

lastLocation

The user's last known GeoPoint, used for distance calculations. If null, distance-related properties will also be null.

Constructors

Link copied to clipboard
constructor(directoryObject: DirectoryObject, lastLocation: GeoPoint?)

Properties

Link copied to clipboard
open override val address: String?

Short address of the object. Null if address is unknown.

Link copied to clipboard
open override val alertDescription: String?

Important alert or status message (e.g., "Temporarily closed", "Limited services").

Link copied to clipboard
open override val attributes: String

Key features or tags of the object, formatted for display (e.g., "Wi-Fi · Parking · 24/7").

Link copied to clipboard
open override val chargingIsActive: Boolean?

Indicates if the charging station is currently active/operational. Relevant only for EV charging stations.

Link copied to clipboard
open override val chargingIsBusy: Boolean?

Indicates if the charging station is currently busy (all connectors in use). Relevant only for EV charging stations.

Link copied to clipboard

Detailed status of the charging station. Relevant only for EV charging stations.

Link copied to clipboard
open override val directoryObject: DirectoryObject

The source directory object containing business data.

Link copied to clipboard
open override val distance: Meter?

Distance to the object. Null if distance is unavailable.

Link copied to clipboard
open override val isOpen: Boolean?

Current open/closed status. True if open, false if closed, null if status is unknown.

Link copied to clipboard
open override val rating: Float?

Average user rating from 0 to 5 (e.g., 4.2). Null if not rated.

Link copied to clipboard
open override val reviewsCount: Int

Total number of reviews submitted for this object.

Link copied to clipboard
open override val subtitle: String

Subtitle or short description of the object.

Link copied to clipboard
open override val title: String

Main title of the object, typically the organization or place name.