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 class
ListDocument.ListBuilderInternal
Internal 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 NewListDocument
with List of Document documentList as passed in constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 aList
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 ofListDocument.ListBuilderInternal
to directly create Document with List of DocumentsString
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.
-
-
-
Constructor Detail
-
ListDocument
public ListDocument(List<Document> documentList)
Create a NewListDocument
with List of Document documentList as passed in constructor- Parameters:
documentList
- ListDocument documentList.
-
-
Method Detail
-
listBuilder
public static Document.ListBuilder listBuilder()
Provides Builder methods ofListDocument.ListBuilderInternal
to 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:Document
Gets the document as aList
if it is a document type array.Each value contained in the
List
is the same as how the value would be represented byDocument
.- Specified by:
asList
in 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.
-
-