Class StringDocument
- java.lang.Object
-
- software.amazon.awssdk.core.document.internal.StringDocument
-
- All Implemented Interfaces:
Serializable
,Document
@Immutable public final class StringDocument extends Object implements Document
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.document.Document
Document.ListBuilder, Document.MapBuilder
-
-
Constructor Summary
Constructors Constructor Description StringDocument(String string)
Create a NewStringDocument
with boolean value as passed in constructor
-
Method Summary
All 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()
Gets the document as aMap
.SdkNumber
asNumber()
String
asString()
Gets the String value of the Document.boolean
equals(Object o)
int
hashCode()
boolean
isString()
String
toString()
Object
unwrap()
Unwraps the Document Boolean to a String Object.
-
-
-
Constructor Detail
-
StringDocument
public StringDocument(String string)
Create a NewStringDocument
with boolean value as passed in constructor- Parameters:
string
- boolean value.
-
-
Method Detail
-
unwrap
public Object unwrap()
Unwraps the Document Boolean to a String Object.
-
asBoolean
public boolean asBoolean()
-
isString
public boolean isString()
-
asString
public String asString()
Gets the String value of the Document.
-
asMap
public Map<String,Document> asMap()
Description copied from interface:Document
Gets the document as aMap
.Each value contained in the
Map
is the same as how the value would be represented byDocument
.
-
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
.
-
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 visitString of visitor.
-
-