protected class QueryElevationComponent.MapElevationProvider extends Object implements QueryElevationComponent.ElevationProvider
QueryElevationComponent.ElevationProvider.
It does not support subset matching (see QueryElevationComponent.parseMatchPolicy(String)).
Immutable.
| Constructor and Description |
|---|
MapElevationProvider(Map<QueryElevationComponent.ElevatingQuery,QueryElevationComponent.ElevationBuilder> elevationBuilderMap) |
| Modifier and Type | Method and Description |
|---|---|
QueryElevationComponent.Elevation |
getElevationForQuery(String queryString)
Gets the elevation associated to the provided query.
|
int |
size()
Gets the number of query elevations in this
QueryElevationComponent.ElevationProvider. |
public MapElevationProvider(Map<QueryElevationComponent.ElevatingQuery,QueryElevationComponent.ElevationBuilder> elevationBuilderMap)
public QueryElevationComponent.Elevation getElevationForQuery(String queryString)
QueryElevationComponent.ElevationProviderBy contract and by design, only one elevation may be associated to a given query (this can be safely verified by an assertion).
getElevationForQuery in interface QueryElevationComponent.ElevationProviderqueryString - The query string (not analyzed yet,
this QueryElevationComponent.ElevationProvider is in charge of analyzing it).null if none.public int size()
QueryElevationComponent.ElevationProviderQueryElevationComponent.ElevationProvider.size in interface QueryElevationComponent.ElevationProviderCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.