@Immutable public final class ListDocument extends Object implements Document
Modifier and Type | Class and Description |
---|---|
static class |
ListDocument.ListBuilderInternal
Internal List Builder for easy construction of Document Lists.
|
Document.ListBuilder, Document.MapBuilder
Constructor and Description |
---|
ListDocument(List<Document> documentList)
Create a New
ListDocument with List of Document documentList 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() |
List<Document> |
asList()
Gets the document as a
List if it is a document type array. |
Map<String,Document> |
asMap() |
SdkNumber |
asNumber() |
String |
asString() |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isList() |
static Document.ListBuilder |
listBuilder()
Provides Builder methods of
ListDocument.ListBuilderInternal to directly create Document with List of Documents |
String |
toString() |
Object |
unwrap()
Gets the value of the document as a Java type that represents the
Loops through the individual Document and unwraps each of the document.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fromBoolean, fromList, fromMap, fromNull, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromNumber, fromString, isBoolean, isMap, isNull, isNumber, isString, mapBuilder
public ListDocument(List<Document> documentList)
ListDocument
with List of Document documentList as passed in constructordocumentList
- ListDocument documentList.public static Document.ListBuilder listBuilder()
ListDocument.ListBuilderInternal
to directly create Document with List of DocumentslistBuilder
in interface Document
public Object unwrap()
public boolean asBoolean()
public String asString()
public SdkNumber asNumber()
public boolean isList()
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
.
asList
in interface Document
ListDocument
}.public <R> R accept(DocumentVisitor<? extends R> visitor)
public void accept(VoidDocumentVisitor visitor)
Copyright © 2022. All rights reserved.