Summary: Inherited Constants | Methods | Inherited Methods | [Expand All]
public abstract class

# FenceQueryRequest

extends Object
implements SafeParcelable

java.lang.Object
↳ | com.google.android.gms.awareness.fence.FenceQueryRequest

## Class Overview

Defines the interface for querying fences in the `FenceApi`.

## Summary

[Expand] Inherited Constants
From interface com.google.android.gms.common.internal.safeparcel.SafeParcelable
String | NULL |
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

Public Methods
static FenceQueryRequest | all() Query all the fences from the `FenceApi` instance corresponding to the calling package.
static FenceQueryRequest | forFences(String... fenceKeys) Query the defined fences for the given keys.
static FenceQueryRequest | forFences(Collection<String> fenceKeys) Query the Awareness Manager Fences for the given keys.

[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(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Public Methods

#### public static FenceQueryRequest all ()

Query all the fences from the `FenceApi` instance corresponding to the calling package.

##### Returns

- `FenceQueryRequest`

#### public static FenceQueryRequest forFences (String... fenceKeys)

Query the defined fences for the given keys.

##### Parameters

fenceKeys | Fence keys for querying fences in the `FenceApi`. The fence keys should not be null.

##### Returns

- `FenceQueryRequest`

##### Throws

| NullPointerException} if the collection of fence keys is null.
| IllegalArgumentException} if any of the fence keys in the fence keys collection is null or empty.

#### public static FenceQueryRequest forFences (Collection<String> fenceKeys)

Query the Awareness Manager Fences for the given keys.

##### Parameters

fenceKeys | that should be used for querying fences in the `FenceApi`. The `Collection` should not be null and should only contain non null valid fence keys.

##### Returns

- `FenceQueryRequest`

##### Throws

| NullPointerException} if the `Collection` of fence keys is null.
| IllegalArgumentException} if any of the fence key in the `Collection` is null or empty.