public final class QueryDocumentSnapshot extends DocumentSnapshot
getData() or DocumentSnapshot.get(String) methods.
QueryDocumentSnapshot offers the same API surface as DocumentSnapshot. Since query
results contain only existing documents, the DocumentSnapshot.exists() method will always return true and
getData() will never be null.
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getData()
Returns the fields of the document as a Map.
|
<T> T |
toObject(Class<T> valueType)
Returns the contents of the document converted to a POJO.
|
contains, contains, equals, exists, get, get, getBlob, getBoolean, getCreateTime, getDate, getDouble, getGeoPoint, getId, getLong, getReadTime, getReference, getString, getUpdateTime, hashCode@Nonnull public Map<String,Object> getData()
getData in class DocumentSnapshot@Nonnull public <T> T toObject(@Nonnull Class<T> valueType)
toObject in class DocumentSnapshotvalueType - The Java class to createCopyright © 2018 Google. All rights reserved.