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(Iterable<Filter> filters)
Returns a filter that matches items which are matched by every element of filters.
static Filter and(Filter filter, Filter... additionalFilters)
Returns a logical expression which combines filters with the 'AND' operator.
static Filter contains(SearchableMetadataField<String> field, String value)
Returns a filter which checks whether value is a substring of field.
static Filter eq(CustomPropertyKey key, String value)
Returns a filter which checks whether a custom property with the specified key exists and its value equals value.
static <T> Filter eq(SearchableMetadataField<T> field, T value)
Returns a filter which checks if the value of field equals value.
static <T extends Comparable<T>> Filter greaterThan(SearchableOrderedMetadataField<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(SearchableOrderedMetadataField<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(SearchableCollectionMetadataField<T> field, T value)
Returns a filter which checks whether value is an element of field.
static <T extends Comparable<T>> Filter lessThan(SearchableOrderedMetadataField<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(SearchableOrderedMetadataField<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 openedByMe()
Returns a filter that matches only items that the current user has opened in the past.
static Filter or(Iterable<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 ownedByMe()
Returns a filter that matches only items that the current user owns.
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

Public Constructors

public Filters ()

Public Methods

public static Filter and (Iterable<Filter> filters)

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

Parameters
filters Iterable
Returns
Filter

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

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

Parameters
filter Filter
additionalFilters Filter
Returns
Filter

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

Returns a filter which checks whether value is a substring of field. This filter can only be used with fields that contain a string value.

Parameters
field SearchableMetadataField
value String
Returns
Filter

public static Filter eq (CustomPropertyKey key, String value)

Returns a filter which checks whether a custom property with the specified key exists and its value equals value. The provided value may not be null.

Parameters
key CustomPropertyKey
value String
Returns
Filter

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

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

Parameters
field SearchableMetadataField
value T
Returns
Filter

public static Filter greaterThan (SearchableOrderedMetadataField<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.

Parameters
field SearchableOrderedMetadataField
value T
Returns
Filter

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

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

Parameters
field SearchableOrderedMetadataField
value T
Returns
Filter

public static Filter in (SearchableCollectionMetadataField<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.

Parameters
field SearchableCollectionMetadataField
value T
Returns
Filter

public static Filter lessThan (SearchableOrderedMetadataField<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.

Parameters
field SearchableOrderedMetadataField
value T
Returns
Filter

public static Filter lessThanEquals (SearchableOrderedMetadataField<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.

Parameters
field SearchableOrderedMetadataField
value T
Returns
Filter

public static Filter not (Filter toNegate)

Returns the negation of an filter.

Parameters
toNegate Filter
Returns
Filter

public static Filter openedByMe ()

Returns a filter that matches only items that the current user has opened in the past.

Returns
Filter

public static Filter or (Iterable<Filter> filters)

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

Parameters
filters Iterable
Returns
Filter

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

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

Parameters
filter Filter
additionalFilters Filter
Returns
Filter

public static Filter ownedByMe ()

Returns a filter that matches only items that the current user owns.

Returns
Filter

public static Filter sharedWithMe ()

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

Returns
Filter