Hide

Filters

public class Filters extends Object
java.lang.Object
   ↳ com.google.android.gms.drive.query.Filters

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

Public Constructor Summary

Public Method Summary

static Filter
and(Filter filter, Filter... additionalFilters)
static Filter
and(Iterable<Filter> filters)
static Filter
static <T> Filter
eq(SearchableMetadataField<T> field, T value)
static Filter
static <T extends Comparable<T>> Filter
static <T extends Comparable<T>> Filter
static <T> Filter
static <T extends Comparable<T>> Filter
static <T extends Comparable<T>> Filter
static Filter
not(Filter toNegate)
static Filter
static Filter
or(Iterable<Filter> filters)
static Filter
or(Filter filter, Filter... additionalFilters)
static Filter
static Filter

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 (Iterable<Filter> filters)

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

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.

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

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

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.

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.

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.

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.

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.

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.

public static Filter not (Filter toNegate)

Returns the negation of an filter.

public static Filter openedByMe ()

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

public static Filter or (Iterable<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 ownedByMe ()

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

public static Filter sharedWithMe ()

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