PlaceFilter | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Inherited Constants | Ctors | Methods | Inherited Methods | [Expand All]
public final class

# PlaceFilter

extends Object
implements Parcelable

java.lang.Object
↳ | com.google.android.gms.location.places.PlaceFilter

## Class Overview

Criteria for filtering results from the Google Place Detection API.

A PlaceFilter allows you to restrict results to only those places that are of interest to them.

## Summary

[Expand] Inherited Constants
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

Public Constructors
| PlaceFilter() Construct a `PlaceFilter` object without any constraints, i.e.
| PlaceFilter(boolean requireOpenNow, Collection<String> restrictToPlaceIds) Construct a `PlaceFilter` object.

Public Methods
boolean | equals(Object object)
Set<String> | getPlaceIds() Returns the PlaceIds being requested.
int | hashCode()
boolean | isRestrictedToPlacesOpenNow() Return true if results are restricted to only places that are open now.
boolean | matches(Place place) Verifies whether the given `Place` matches all the restrictions defined by this filter.
String | toString()

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Public Constructors

#### public PlaceFilter ()

Construct a `PlaceFilter` object without any constraints, i.e. all places will match this filter.

#### public PlaceFilter (boolean requireOpenNow, Collection<String> restrictToPlaceIds)

Construct a `PlaceFilter` object.

##### Parameters

requireOpenNow | if true, return only places open now
restrictToPlaceIds | the specific PlaceIds to match

## Public Methods

#### public boolean equals (Object object)

#### public Set<String> getPlaceIds ()

Returns the PlaceIds being requested.

#### public int hashCode ()

#### public boolean isRestrictedToPlacesOpenNow ()

Return true if results are restricted to only places that are open now.

#### public boolean matches (Place place)

Verifies whether the given `Place` matches all the restrictions defined by this filter.

#### public String toString ()