@Immutable 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, wait
fromBoolean, fromList, fromMap, fromNull, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromString, isBoolean, isList, isNull, isNumber, isString, listBuilder
public 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 Document
public Object unwrap()
public boolean asBoolean()
Document
boolean
if it is a boolean.public String asString()
Document
String
.public boolean isMap()
public Map<String,Document> asMap()
Document
Map
.
Each value contained in the Map
is the same as how the value
would be represented by Document
.
asMap
in interface Document
MapDocument
}.public List<Document> asList()
Document
List
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.