@Test public void testHashCode() { Query q1a = Query.atPath(ResourcePath.fromString("foo")) .filter(filter("i1", "<", 2)) .filter(filter("i2", "==", 3)); Query q2a = Query.atPath(ResourcePath.fromString("foo")); Query q2b = Query.atPath(ResourcePath.fromString("foo")); Query q3a = Query.atPath(ResourcePath.fromString("foo/bar")); Query q3b = Query.atPath(ResourcePath.fromString("foo/bar")); Query q4a = Query.atPath(ResourcePath.fromString("foo")) .orderBy(orderBy("foo")) .orderBy(orderBy("bar")); Query q4b = Query.atPath(ResourcePath.fromString("foo")) .orderBy(orderBy("foo")) .orderBy(orderBy("bar")); Query q5a = Query.atPath(ResourcePath.fromString("foo")) .orderBy(orderBy("bar")) .orderBy(orderBy("foo")); Query q6a = Query.atPath(ResourcePath.fromString("foo")) .filter(filter("bar", ">", 2)) .orderBy(orderBy("bar")); Query q7a = Query.atPath(ResourcePath.fromString("foo")).limitToFirst(10); testEquality( asList( asList(q1a.hashCode()), asList(q2a.hashCode(), q2b.hashCode()), asList(q3a.hashCode(), q3b.hashCode()), asList(q4a.hashCode(), q4b.hashCode()), asList(q5a.hashCode()), asList(q6a.hashCode()), asList(q7a.hashCode()))); }
@Override public int hashCode() { return 31 * this.toTarget().hashCode() + limitType.hashCode(); }
Query { @Override public int hashCode() { return 31 * this.toTarget().hashCode() + limitType.hashCode(); } }
Query { @Override public int hashCode() { return 31 * this.toTarget().hashCode() + limitType.hashCode(); } Query(
      ResourcePath path,
      @Nullable String collectionGroup,
      List<Filter> filters,
      List<OrderBy> explicitSortOrder,
      long limit,
      LimitType limitType,
      @Nullable Bound startAt,
      @Nullable Bound endAt);  Query(ResourcePath path, @Nullable String collectionGroup); }
Query { @Override public int hashCode() { return 31 * this.toTarget().hashCode() + limitType.hashCode(); } Query(
      ResourcePath path,
      @Nullable String collectionGroup,
      List<Filter> filters,
      List<OrderBy> explicitSortOrder,
      long limit,
      LimitType limitType,
      @Nullable Bound startAt,
      @Nullable Bound endAt);  Query(ResourcePath path, @Nullable String collectionGroup); static Query atPath(ResourcePath path); ResourcePath getPath(); @Nullable String getCollectionGroup(); boolean isDocumentQuery(); boolean isCollectionGroupQuery(); boolean matchesAllDocuments(); List<Filter> getFilters(); long getLimitToFirst(); boolean hasLimitToFirst(); long getLimitToLast(); boolean hasLimitToLast(); LimitType getLimitType(); @Nullable Bound getStartAt(); @Nullable Bound getEndAt(); FieldPath getFirstOrderByField(); @Nullable FieldPath inequalityField(); @Nullable Operator findFilterOperator(List<Operator> operators); Query filter(Filter filter); Query orderBy(OrderBy order); Query limitToFirst(long limit); Query limitToLast(long limit); Query startAt(Bound bound); Query endAt(Bound bound); Query asCollectionQueryAtPath(ResourcePath path); List<OrderBy> getExplicitOrderBy(); List<OrderBy> getOrderBy(); boolean matches(Document doc); Comparator<Document> comparator(); Target toTarget(); String getCanonicalId(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
Query { @Override public int hashCode() { return 31 * this.toTarget().hashCode() + limitType.hashCode(); } Query(
      ResourcePath path,
      @Nullable String collectionGroup,
      List<Filter> filters,
      List<OrderBy> explicitSortOrder,
      long limit,
      LimitType limitType,
      @Nullable Bound startAt,
      @Nullable Bound endAt);  Query(ResourcePath path, @Nullable String collectionGroup); static Query atPath(ResourcePath path); ResourcePath getPath(); @Nullable String getCollectionGroup(); boolean isDocumentQuery(); boolean isCollectionGroupQuery(); boolean matchesAllDocuments(); List<Filter> getFilters(); long getLimitToFirst(); boolean hasLimitToFirst(); long getLimitToLast(); boolean hasLimitToLast(); LimitType getLimitType(); @Nullable Bound getStartAt(); @Nullable Bound getEndAt(); FieldPath getFirstOrderByField(); @Nullable FieldPath inequalityField(); @Nullable Operator findFilterOperator(List<Operator> operators); Query filter(Filter filter); Query orderBy(OrderBy order); Query limitToFirst(long limit); Query limitToLast(long limit); Query startAt(Bound bound); Query endAt(Bound bound); Query asCollectionQueryAtPath(ResourcePath path); List<OrderBy> getExplicitOrderBy(); List<OrderBy> getOrderBy(); boolean matches(Document doc); Comparator<Document> comparator(); Target toTarget(); String getCanonicalId(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }