Package com.google.maps.model
Class ComponentFilter
- java.lang.Object
-
- com.google.maps.model.ComponentFilter
-
- All Implemented Interfaces:
com.google.maps.internal.StringJoin.UrlValue
public class ComponentFilter extends java.lang.Object implements com.google.maps.internal.StringJoin.UrlValueA component filter for a geocode request. In a geocoding response, the Google Geocoding API can return address results restricted to a specific area. The restriction is specified using the components filter.Please see Component Filtering for more detail.
-
-
Constructor Summary
Constructors Constructor Description ComponentFilter(java.lang.String component, java.lang.String value)Constructs a component filter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComponentFilteradministrativeArea(java.lang.String administrativeArea)Matches all the administrative area levels.static ComponentFiltercountry(java.lang.String country)Matches a country name or a two letter ISO 3166-1 country code.static ComponentFilterlocality(java.lang.String locality)Matches against both locality and sublocality types.static ComponentFilterpostalCode(java.lang.String postalCode)Matches postal code or postal code prefix.static ComponentFilterroute(java.lang.String route)Matches long or short name of a route.java.lang.StringtoString()java.lang.StringtoUrlValue()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toUrlValue
public java.lang.String toUrlValue()
- Specified by:
toUrlValuein interfacecom.google.maps.internal.StringJoin.UrlValue
-
route
public static ComponentFilter route(java.lang.String route)
Matches long or short name of a route.- Parameters:
route- The name of the route to filter on.- Returns:
- Returns a
ComponentFilter.
-
locality
public static ComponentFilter locality(java.lang.String locality)
Matches against both locality and sublocality types.- Parameters:
locality- The locality to filter on.- Returns:
- Returns a
ComponentFilter.
-
administrativeArea
public static ComponentFilter administrativeArea(java.lang.String administrativeArea)
Matches all the administrative area levels.- Parameters:
administrativeArea- The administrative area to filter on.- Returns:
- Returns a
ComponentFilter.
-
postalCode
public static ComponentFilter postalCode(java.lang.String postalCode)
Matches postal code or postal code prefix.- Parameters:
postalCode- The postal code to filter on.- Returns:
- Returns a
ComponentFilter.
-
country
public static ComponentFilter country(java.lang.String country)
Matches a country name or a two letter ISO 3166-1 country code.- Parameters:
country- The country to filter on.- Returns:
- Returns a
ComponentFilter.
-
-