[[["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 2025-09-04 UTC."],[],[],null,["# Class GenericQuerySnapshot<QueryT> (3.32.1)\n\nVersion latestkeyboard_arrow_down\n\n- [3.32.1 (latest)](/java/docs/reference/google-cloud-firestore/latest/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.32.0](/java/docs/reference/google-cloud-firestore/3.32.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.31.9](/java/docs/reference/google-cloud-firestore/3.31.9/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.30.11](/java/docs/reference/google-cloud-firestore/3.30.11/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.28.0](/java/docs/reference/google-cloud-firestore/3.28.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.27.2](/java/docs/reference/google-cloud-firestore/3.27.2/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.26.5](/java/docs/reference/google-cloud-firestore/3.26.5/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.25.1](/java/docs/reference/google-cloud-firestore/3.25.1/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.24.3](/java/docs/reference/google-cloud-firestore/3.24.3/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.22.0](/java/docs/reference/google-cloud-firestore/3.22.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.21.4](/java/docs/reference/google-cloud-firestore/3.21.4/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.20.0](/java/docs/reference/google-cloud-firestore/3.20.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.17.0](/java/docs/reference/google-cloud-firestore/3.17.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.16.3](/java/docs/reference/google-cloud-firestore/3.16.3/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.15.7](/java/docs/reference/google-cloud-firestore/3.15.7/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.14.4](/java/docs/reference/google-cloud-firestore/3.14.4/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.13.2](/java/docs/reference/google-cloud-firestore/3.13.2/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.12.1](/java/docs/reference/google-cloud-firestore/3.12.1/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.11.0](/java/docs/reference/google-cloud-firestore/3.11.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.10.0](/java/docs/reference/google-cloud-firestore/3.10.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.9.6](/java/docs/reference/google-cloud-firestore/3.9.6/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.8.2](/java/docs/reference/google-cloud-firestore/3.8.2/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.7.10](/java/docs/reference/google-cloud-firestore/3.7.10/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.6.0](/java/docs/reference/google-cloud-firestore/3.6.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.5.0](/java/docs/reference/google-cloud-firestore/3.5.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.4.2](/java/docs/reference/google-cloud-firestore/3.4.2/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.3.0](/java/docs/reference/google-cloud-firestore/3.3.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.2.0](/java/docs/reference/google-cloud-firestore/3.2.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.1.0](/java/docs/reference/google-cloud-firestore/3.1.0/com.google.cloud.firestore.GenericQuerySnapshot)\n- [3.0.21](/java/docs/reference/google-cloud-firestore/3.0.21/com.google.cloud.firestore.GenericQuerySnapshot) \n\n public abstract class GenericQuerySnapshot\u003cQueryT\u003e implements Iterable\u003cQueryDocumentSnapshot\u003e\n\nAbstract. A GenericQuerySnapshot represents the results of a query that returns documents. It can\ncontain zero or more DocumentSnapshot objects. \n\nInheritance\n-----------\n\n[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e GenericQuerySnapshot\\\u003cQueryT\\\u003e \n\nImplements\n----------\n\n[Iterable\\\u003cQueryDocumentSnapshot\\\u003e](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable\u003ccom/google/cloud/firestore/QueryDocumentSnapshot\u003e.html) \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### GenericQuerySnapshot(QueryT query, Timestamp readTime, List\\\u003cQueryDocumentSnapshot\\\u003e documents, List\\\u003cDocumentChange\\\u003e documentChanges)\n\n protected GenericQuerySnapshot(QueryT query, Timestamp readTime, List\u003cQueryDocumentSnapshot\u003e documents, List\u003cDocumentChange\u003e documentChanges)\n\nFields\n------\n\n### query\n\n protected final QueryT query\n\n### readTime\n\n protected final Timestamp readTime\n\nMethods\n-------\n\n### \\\u003cT\\\u003etoObjects(Class\\\u003cT\\\u003e clazz)\n\n public List\u003cT\u003e \u003cT\u003etoObjects(Class\u003cT\u003e clazz)\n\nReturns the contents of the documents in the QuerySnapshot, converted to the provided class, as\na list.\n\n### equals(Object o)\n\n public boolean equals(Object o)\n\nTests for equality with this object.\n\n**Overrides** \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-)\n\n### getDocumentChanges()\n\n public List\u003cDocumentChange\u003e getDocumentChanges()\n\nReturns the list of documents that changed since the last snapshot. If it's the first snapshot\nall documents will be in the list as added changes.\n\n### getDocuments()\n\n public List\u003cQueryDocumentSnapshot\u003e getDocuments()\n\nReturns the documents in this QuerySnapshot as a List in order of the query.\n\n### getQuery()\n\n public QueryT getQuery()\n\nReturns the query for the snapshot.\n\n### getReadTime()\n\n public Timestamp getReadTime()\n\nReturns the time at which this snapshot was read.\n\n### hashCode()\n\n public int hashCode()\n\n**Overrides** \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)\n\n### isEmpty()\n\n public boolean isEmpty()\n\nReturns true if there are no documents in the QuerySnapshot.\n\n### iterator()\n\n public Iterator\u003cQueryDocumentSnapshot\u003e iterator()\n\n### size()\n\n public int size()\n\nReturns the number of DocumentSnapshots in this snapshot.\n\n### toString()\n\n public String toString()\n\n**Overrides** \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)"]]