Package com.cercalia.sdk.model.suggest
Class SuggestResult
java.lang.Object
com.cercalia.sdk.model.suggest.SuggestResult
Normalized suggestion result from Cercalia Suggest API.
A suggestion represents a potential match for a partial search string,
which can be an address, a city, a POI, etc. Use getDisplayText()
for the user-facing string and getId() for further detailed queries.
Example usage:
SuggestResult suggestion = results.get(0);
System.out.println("Suggestion: " + suggestion.getDisplayText());
if (suggestion.getCoord() != null) {
System.out.println("Location: " + suggestion.getCoord());
}
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SuggestResult.Builderbuilder()@Nullable SuggestCitygetCity()@Nullable CoordinategetCoord()@Nullable SuggestAdminEntity@NotNull String@Nullable SuggestHouseNumbers@NotNull StringgetId()@Nullable Boolean@Nullable SuggestAdminEntity@Nullable SuggestPoigetPoi()@Nullable String@Nullable SuggestAdminEntity@Nullable DoublegetScore()@Nullable SuggestStreet@Nullable SuggestAdminEntity@NotNull SuggestResultTypegetType()
-
Method Details
-
builder
-
getId
- Returns:
- Unique identifier for the suggestion.
-
getDisplayText
- Returns:
- Formatted text intended to be displayed to the user.
-
getType
- Returns:
- The type of the suggestion.
-
getStreet
- Returns:
- Street information.
-
getCity
- Returns:
- Locality information.
-
getPostalCode
- Returns:
- Postal code.
-
getMunicipality
- Returns:
- Municipality details.
-
getSubregion
- Returns:
- Subregion details.
-
getRegion
- Returns:
- Region details.
-
getCountry
- Returns:
- Country details.
-
getCoord
- Returns:
- Geographic coordinates.
-
getHouseNumbers
- Returns:
- House number details.
-
getPoi
- Returns:
- POI details.
-
getIsOfficial
- Returns:
- Whether the suggestion is official.
-
getScore
- Returns:
- Match score (0.0 to 100).
-