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> 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()
Map<String,Document>
asMap()
Gets the document as aMap
.SdkNumber
asNumber()
Returned as {SdkNumber
}.String
asString()
boolean
equals(Object o)
int
hashCode()
boolean
isNumber()
String
toString()
Object
unwrap()
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:Document
Gets the document as aMap
.Each value contained in the
Map
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 visitNumber of visitor.
-
-