Class ListDocument
- java.lang.Object
-
- software.amazon.awssdk.core.document.internal.ListDocument
-
- All Implemented Interfaces:
Serializable,Document
@Immutable public final class ListDocument extends Object implements Document
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classListDocument.ListBuilderInternalInternal List Builder for easy construction of Document Lists.-
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.document.Document
Document.ListBuilder, Document.MapBuilder
-
-
Constructor Summary
Constructors Constructor Description ListDocument(List<Document> documentList)Create a NewListDocumentwith List of Document documentList as passed in constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(DocumentVisitor<? extends R> visitor)Accepts a visitor with the Document.voidaccept(VoidDocumentVisitor visitor)Accepts a visitor with the Document.booleanasBoolean()List<Document>asList()Gets the document as aListif it is a document type array.Map<String,Document>asMap()SdkNumberasNumber()StringasString()booleanequals(Object o)inthashCode()booleanisList()static Document.ListBuilderlistBuilder()Provides Builder methods ofListDocument.ListBuilderInternalto directly create Document with List of DocumentsStringtoString()Objectunwrap()Gets the value of the document as a Java type that represents the Loops through the individual Document and unwraps each of the document.
-
-
-
Constructor Detail
-
ListDocument
public ListDocument(List<Document> documentList)
Create a NewListDocumentwith List of Document documentList as passed in constructor- Parameters:
documentList- ListDocument documentList.
-
-
Method Detail
-
listBuilder
public static Document.ListBuilder listBuilder()
Provides Builder methods ofListDocument.ListBuilderInternalto directly create Document with List of Documents- Returns:
- Builder methods to Construct Document with List of Documents.
-
unwrap
public 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.
-
asBoolean
public boolean asBoolean()
-
asString
public String asString()
-
asNumber
public SdkNumber asNumber()
-
isList
public boolean isList()
-
asList
public List<Document> asList()
Description copied from interface:DocumentGets the document as aListif it is a document type array.Each value contained in the
Listis the same as how the value would be represented byDocument.- Specified by:
asListin interfaceDocument- Returns:
- unmodifiableList of the List of Documents in the {
ListDocument}.
-
accept
public <R> R accept(DocumentVisitor<? extends R> visitor)
Accepts a visitor with the Document.
-
accept
public void accept(VoidDocumentVisitor visitor)
Accepts a visitor with the Document. Calls visitList of visitor.
-
-