Class Filter (3.12.1)

public class Filter

Inheritance

Object > Filter

Static Methods

and(Filter[] filters)

public static Filter and(Filter[] filters)

Creates a new filter that is a conjunction of the given filters. A conjunction filter includes a document if it satisfies all of the given filters.

Parameter
NameDescription
filtersFilter[]

The list of filters to perform a conjunction for.

Returns
TypeDescription
Filter

The newly created filter.

arrayContains(FieldPath fieldPath, Object value)

public static Filter arrayContains(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given array field contains the given value.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

arrayContains(String field, Object value)

public static Filter arrayContains(String field, Object value)

Creates a new filter for checking that the given array field contains the given value.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

arrayContainsAny(FieldPath fieldPath, Object value)

public static Filter arrayContainsAny(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given array field contains any of the given values.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The list of values used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

arrayContainsAny(String field, Object value)

public static Filter arrayContainsAny(String field, Object value)

Creates a new filter for checking that the given array field contains any of the given values.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The list of values used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

equalTo(FieldPath fieldPath, Object value)

public static Filter equalTo(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given field is equal to the given value.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

equalTo(String field, Object value)

public static Filter equalTo(String field, Object value)

Creates a new filter for checking that the given field is equal to the given value.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

greaterThan(FieldPath fieldPath, Object value)

public static Filter greaterThan(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given field is greater than the given value.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

greaterThan(String field, Object value)

public static Filter greaterThan(String field, Object value)

Creates a new filter for checking that the given field is greater than the given value.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

greaterThanOrEqualTo(FieldPath fieldPath, Object value)

public static Filter greaterThanOrEqualTo(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given field is greater than or equal to the given value.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

greaterThanOrEqualTo(String field, Object value)

public static Filter greaterThanOrEqualTo(String field, Object value)

Creates a new filter for checking that the given field is greater than or equal to the given value.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

inArray(FieldPath fieldPath, Object value)

public static Filter inArray(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given field equals any of the given values.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The list of values used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

inArray(String field, Object value)

public static Filter inArray(String field, Object value)

Creates a new filter for checking that the given field equals any of the given values.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The list of values used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

lessThan(FieldPath fieldPath, Object value)

public static Filter lessThan(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given field is less than the given value.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

lessThan(String field, Object value)

public static Filter lessThan(String field, Object value)

Creates a new filter for checking that the given field is less than the given value.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

lessThanOrEqualTo(FieldPath fieldPath, Object value)

public static Filter lessThanOrEqualTo(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given field is less than or equal to the given value.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

lessThanOrEqualTo(String field, Object value)

public static Filter lessThanOrEqualTo(String field, Object value)

Creates a new filter for checking that the given field is less than or equal to the given value.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

notEqualTo(FieldPath fieldPath, Object value)

public static Filter notEqualTo(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given field is not equal to the given value.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

notEqualTo(String field, Object value)

public static Filter notEqualTo(String field, Object value)

Creates a new filter for checking that the given field is not equal to the given value.

Parameters
NameDescription
fieldString

The field used for the filter.

valueObject

The value used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

notInArray(FieldPath fieldPath, Object value)

public static Filter notInArray(FieldPath fieldPath, Object value)

Creates a new filter for checking that the given field does not equal any of the given values.

Parameters
NameDescription
fieldPathFieldPath

The field path used for the filter.

valueObject

The list of values used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

notInArray(String field, Object value)

public static Filter notInArray(String field, Object value)

Creates a new filter for checking that the given field does not equal any of the given values.

Parameters
NameDescription
fieldString

The field path used for the filter.

valueObject

The list of values used for the filter.

Returns
TypeDescription
Filter

The newly created filter.

or(Filter[] filters)

public static Filter or(Filter[] filters)

Creates a new filter that is a disjunction of the given filters. A disjunction filter includes a document if it satisfies any of the given filters.

Parameter
NameDescription
filtersFilter[]

The list of filters to perform a disjunction for.

Returns
TypeDescription
Filter

The newly created filter.

Constructors

Filter()

public Filter()