Class NumberDocument
- java.lang.Object
-
- software.amazon.awssdk.core.document.internal.NumberDocument
-
- All Implemented Interfaces:
Serializable,Document
@Immutable public class NumberDocument 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 NumberDocument(SdkNumber number)Created a {NumberDocument} with the specified {SdkNumber}.
-
Method Summary
All 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()Map<String,Document>asMap()Gets the document as aMap.SdkNumberasNumber()Returned as {SdkNumber}.StringasString()booleanequals(Object o)inthashCode()booleanisNumber()StringtoString()Objectunwrap()Unwraps the Document Number to string value of the {SdkNumber}.
-
-
-
Constructor Detail
-
NumberDocument
public NumberDocument(SdkNumber number)
Created a {NumberDocument} with the specified {SdkNumber}. {SdkNumber} is provided as an input to NumberDocument to maintain arbitrary precision of any given number.- Parameters:
number-
-
-
Method Detail
-
asBoolean
public boolean asBoolean()
-
asString
public String asString()
-
isNumber
public boolean isNumber()
-
asNumber
public SdkNumber asNumber()
Returned as {SdkNumber}. The number value can be extracted from the Document by using below methods
-
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.
-
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 visitNumber of visitor.
-
-