public final class MapDocument extends Object implements Document
| Modifier and Type | Class and Description |
|---|---|
static class |
MapDocument.MapBuilderInternal |
Document.ListBuilder, Document.MapBuilder| Constructor and Description |
|---|
MapDocument(Map<String,Document> documentMap)
Create a New
MapDocument with Map of Document value as passed in constructor |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(DocumentVisitor<? extends R> visitor)
Accepts a visitor with the Document.
|
void |
accept(VoidDocumentVisitor visitor)
Accepts a visitor with the Document.
|
boolean |
asBoolean()
Gets the document as a
boolean if it is a boolean. |
List<Document> |
asList()
Gets the document as a
List if it is a document type array. |
Map<String,Document> |
asMap()
Gets the document as a
Map. |
SdkNumber |
asNumber()
|
String |
asString()
Gets the document as a
String. |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isMap() |
static Document.MapBuilder |
mapBuilder()
Create a
MapDocument.MapBuilderInternal for generating a
Document by directly allowing user to put String Keys
and Document Values in the builder methods. |
String |
toString() |
Object |
unwrap()
Gets the value of the document as a Java type that represents the
Loops through the individual Map Entries and unwarap each of the Document Value.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitfromBoolean, fromList, fromMap, fromNull, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromString, isBoolean, isList, isNull, isNumber, isString, listBuilderpublic MapDocument(Map<String,Document> documentMap)
MapDocument with Map of Document value as passed in constructordocumentMap - ListDocument documentList.public static Document.MapBuilder mapBuilder()
MapDocument.MapBuilderInternal for generating a
Document by directly allowing user to put String Keys
and Document Values in the builder methods.mapBuilder in interface Documentpublic Object unwrap()
public boolean asBoolean()
Documentboolean if it is a boolean.public String asString()
DocumentString.public boolean isMap()
public Map<String,Document> asMap()
DocumentMap.
Each value contained in the Map is the same as how the value
would be represented by Document.
asMap in interface DocumentMapDocument}.public List<Document> asList()
DocumentList if it is a document type array.
Each value contained in the List is the same as how the
value would be represented by Document.
public <R> R accept(DocumentVisitor<? extends R> visitor)
public void accept(VoidDocumentVisitor visitor)
Copyright © 2021. All rights reserved.