Class MapDocument
- java.lang.Object
-
- software.amazon.awssdk.core.document.internal.MapDocument
-
- All Implemented Interfaces:
Serializable,Document
@Immutable public final class MapDocument extends Object implements Document
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapDocument.MapBuilderInternal-
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.document.Document
Document.ListBuilder, Document.MapBuilder
-
-
Constructor Summary
Constructors Constructor Description MapDocument(Map<String,Document> documentMap)Create a NewMapDocumentwith Map of Document value 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()Gets the document as abooleanif it is a boolean.List<Document>asList()Gets the document as aListif it is a document type array.Map<String,Document>asMap()Gets the document as aMap.SdkNumberasNumber()StringasString()Gets the document as aString.booleanequals(Object o)inthashCode()booleanisMap()static Document.MapBuildermapBuilder()Create aMapDocument.MapBuilderInternalfor generating aDocumentby directly allowing user to put String Keys and Document Values in the builder methods.StringtoString()Objectunwrap()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.
-
-
-
Constructor Detail
-
MapDocument
public MapDocument(Map<String,Document> documentMap)
Create a NewMapDocumentwith Map of Document value as passed in constructor- Parameters:
documentMap- ListDocument documentList.
-
-
Method Detail
-
mapBuilder
public static Document.MapBuilder mapBuilder()
Create aMapDocument.MapBuilderInternalfor generating aDocumentby directly allowing user to put String Keys and Document Values in the builder methods.- Returns:
- Builder to Construct Document with Map of Documents.
-
unwrap
public 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.
-
asBoolean
public boolean asBoolean()
Description copied from interface:DocumentGets the document as abooleanif it is a boolean.
-
asString
public String asString()
Description copied from interface:DocumentGets the document as aString.
-
isMap
public boolean isMap()
-
asMap
public Map<String,Document> asMap()
Description copied from interface:DocumentGets the document as aMap.Each value contained in the
Mapis the same as how the value would be represented byDocument.- Specified by:
asMapin interfaceDocument- Returns:
- unmodifiableMap of the Map of Documents in the {
MapDocument}.
-
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.
-
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 visitMap of visitor.
-
-