Skip to content

Commit 8559a7d

Browse files
Add hashCode
1 parent 0c8b0ac commit 8559a7d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/Query.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public Query whereIn(@NonNull FieldPath fieldPath, @NonNull List<? extends Objec
350350
* Creates and returns a new {@code Query} with the additional filter that documents must contain
351351
* the specified field and the value does not equal any of the values from the provided list.
352352
*
353-
* <p>One special case is that {@coce whereNotIn} cannot match {@code null} values. To query for
353+
* <p>One special case is that {@code whereNotIn} cannot match {@code null} values. To query for
354354
* documents where a field exists and is {@code null}, use {@code whereNotEqualTo}, which can
355355
* handle this special case.
356356
*
@@ -371,7 +371,7 @@ public Query whereNotIn(@NonNull String field, @NonNull List<? extends Object> v
371371
* Creates and returns a new {@code Query} with the additional filter that documents must contain
372372
* the specified field and the value does not equal any of the values from the provided list.
373373
*
374-
* <p>One special case is that {@coce whereNotIn} cannot match {@code null} values. To query for
374+
* <p>One special case is that {@code whereNotIn} cannot match {@code null} values. To query for
375375
* documents where a field exists and is {@code null}, use {@code whereNotEqualTo}, which can
376376
* handle this special case.
377377
*

firebase-firestore/src/main/java/com/google/firebase/firestore/local/NamedQuery.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,12 @@ public boolean equals(Object o) {
5555
if (!query.equals(that.query)) return false;
5656
return readTime.equals(that.readTime);
5757
}
58+
59+
@Override
60+
public int hashCode() {
61+
int result = name.hashCode();
62+
result = 31 * result + query.hashCode();
63+
result = 31 * result + readTime.hashCode();
64+
return result;
65+
}
5866
}

0 commit comments

Comments
 (0)