Quicknav Quicknav
Links

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

Android Sites

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

close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

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

# Filters

extends Object

java.lang.Object
↳ | com.google.android.gms.drive.query.Filters

## Class Overview

A factory for creating filters that are used to construct a Query.

## Summary

Public Constructors
| Filters()

Public Methods
static Filter | and(Filter filter, Filter... additionalFilters) Returns a logical expression which combines filters with the 'AND' operator.
static Filter | and(List<Filter> filters) Returns a filter that matches items which are matched by every element of `filters`.
static Filter | contains(MetadataField<String> field, String value) Returns a filter that matches items which are matched by all of the provided filter parameters.
static <T> Filter | eq(MetadataField<T> field, T value) Returns a filter which checks if the value of `field` equals `value`.
static <T extends Comparable<T>> Filter | greaterThan(OrderedMetadataField<T> field, T value) Returns a filter which checks if the value of `field` is greater than `value`.
static <T extends Comparable<T>> Filter | greaterThanEquals(OrderedMetadataField<T> field, T value) Returns a filter which checks if the value of `field` is greater than or equal to `value`.
static <T> Filter | in(CollectionMetadataField<T> field, T value) Returns a filter which checks whether `value` is an element of `field`.
static <T extends Comparable<T>> Filter | lessThan(OrderedMetadataField<T> field, T value) Returns a filter which checks if the value of `field` is less than `value`.
static <T extends Comparable<T>> Filter | lessThanEquals(OrderedMetadataField<T> field, T value) Returns a filter which checks if the value of `field` is less than or equal to `value`.
static Filter | not(Filter toNegate) Returns the negation of an filter.
static Filter | or(List<Filter> filters) Returns a filter that matches items which are matched by any element of `filters`.
static Filter | or(Filter filter, Filter... additionalFilters) Returns a filter that matches items which are matched by any of the provided filter parameters.
static Filter | sharedWithMe() Returns a filter that matches only items that are shared with the current user.

[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)

## Public Constructors

#### public Filters ()

## Public Methods

#### public static Filter and (Filter filter, Filter... additionalFilters)

Returns a logical expression which combines filters with the 'AND' operator.

#### public static Filter and (List<Filter> filters)

Returns a filter that matches items which are matched by every element of `filters`.

#### public static Filter contains (MetadataField<String> field, String value)

Returns a filter that matches items which are matched by all of the provided filter parameters.

#### public static Filter eq (MetadataField<T> field, T value)

Returns a filter which checks if the value of `field` equals `value`.

#### public static Filter greaterThan (OrderedMetadataField<T> field, T value)

Returns a filter which checks if the value of `field` is greater than `value`. This filter can only be used with fields that have a sort order.

#### public static Filter greaterThanEquals (OrderedMetadataField<T> field, T value)

Returns a filter which checks if the value of `field` is greater than or equal to `value`.

#### public static Filter in (CollectionMetadataField<T> field, T value)

Returns a filter which checks whether `value` is an element of `field`. This filter can only be used with fields that contain a collection value.

#### public static Filter lessThan (OrderedMetadataField<T> field, T value)

Returns a filter which checks if the value of `field` is less than `value`. This filter can only be used with fields that have a sort order.

#### public static Filter lessThanEquals (OrderedMetadataField<T> field, T value)

Returns a filter which checks if the value of `field` is less than or equal to `value`. This filter can only be used with fields that have a sort order.

#### public static Filter not (Filter toNegate)

Returns the negation of an filter.

#### public static Filter or (List<Filter> filters)

Returns a filter that matches items which are matched by any element of `filters`.

#### public static Filter or (Filter filter, Filter... additionalFilters)

Returns a filter that matches items which are matched by any of the provided filter parameters.

#### public static Filter sharedWithMe ()

Returns a filter that matches only items that are shared with the current user.