Send feedback
Class Query.CompositeFilter (5.0.2)
Stay organized with collections
Save and categorize content based on your preferences.
public static final class Query . CompositeFilter extends Query . Filter
A Filter that combines several sub filters using a CompositeFilterOperator .
For example, to construct a filter of the form a = 1 AND (b = 2 OR c = 3) use:
new CompositeFilter ( CompositeFilterOperator . AND , Arrays . asList (
new FilterPredicate ( "a" , FilterOperator . EQUAL , 1 ),
new CompositeFilter ( CompositeFilterOperator . OR , Arrays . <Filter>asList (
new FilterPredicate ( "b" , FilterOperator . EQUAL , 2 ),
new FilterPredicate ( "c" , FilterOperator . EQUAL , 3 )))));
or
CompositeFilterOperator . and (
FilterOperator . EQUAL . of ( "a" , 1 ),
CompositeFilterOperator . or (
FilterOperator . EQUAL . of ( "b" , 2 ),
FilterOperator . EQUAL . of ( "c" , 3 )));
Constructors
CompositeFilter(Query.CompositeFilterOperator operator, Collection<Query.Filter> subFilters)
public CompositeFilter ( Query . CompositeFilterOperator operator , Collection<Query . Filter > subFilters )
Methods
equals(@Nullable Object obj)
public boolean equals ( @Nullable Object obj )
Overrides
getOperator()
public Query . CompositeFilterOperator getOperator ()
getSubFilters()
public List<Query . Filter > getSubFilters ()
Returns an immutable list of sub filters.
hashCode()
Returns
Type
Description
int
Overrides
toString()
Returns
Type
Description
String
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-14 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-05-14 UTC."],[],[]]