AggregateQuery
public class AggregateQuery
A query that calculates aggregations over an underlying query.
Subclassing Note: Cloud Firestore classes are not meant to be subclassed except for use in test mocks. Subclassing is not supported in production code and new SDK releases may break code that does so.
Summary
Public methods |
|
|---|---|
boolean |
Compares this object with the given object for equality. |
@NonNull Task<AggregateQuerySnapshot> |
get(@NonNull AggregateSource source)Executes this query. |
@NonNull Query |
getQuery()Returns the query whose aggregations will be calculated by this object. |
int |
hashCode()Calculates and returns the hash code for this object. |
Public methods
equals
public boolean equals(Object object)
Compares this object with the given object for equality.
This object is considered "equal" to the other object if and only if all of the following conditions are satisfied:
objectis a non-null instance ofAggregateQuery.objectperforms the same aggregations as thisAggregateQuery.- The underlying
Queryofobjectcompares equal to that of this object.
| Parameters | |
|---|---|
Object object |
The object to compare to this object for equality. |
| Returns | |
|---|---|
boolean |
|
get
public @NonNull Task<AggregateQuerySnapshot> get(@NonNull AggregateSource source)
Executes this query.
| Parameters | |
|---|---|
@NonNull AggregateSource source |
The source from which to acquire the aggregate results. |
| Returns | |
|---|---|
@NonNull Task<AggregateQuerySnapshot> |
A |
getQuery
public @NonNull Query getQuery()
Returns the query whose aggregations will be calculated by this object.
hashCode
public int hashCode()
Calculates and returns the hash code for this object.
| Returns | |
|---|---|
int |
the hash code for this object. |