Class NumberDocument

    • 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()
        Specified by:
        asBoolean in interface Document
        Returns:
        Returns the boolean value.
      • asString

        public String asString()
        Specified by:
        asString in interface Document
        Returns:
        Returns the string value.
      • isNumber

        public boolean isNumber()
        Specified by:
        isNumber in interface Document
        Returns:
        Returns true if this document is a number value.
      • asMap

        public Map<String,​Document> asMap()
        Description copied from interface: Document
        Gets the document as a Map.

        Each value contained in the Map is the same as how the value would be represented by Document.

        Specified by:
        asMap in interface Document
        Returns:
        Returns the Document map.
      • accept

        public <R> R accept​(DocumentVisitor<? extends R> visitor)
        Accepts a visitor with the Document.
        Specified by:
        accept in interface Document
        Type Parameters:
        R - visitor return type.
        Parameters:
        visitor - Visitor to dispatch to.
        Returns:
        Returns the accepted result by calling visitNumber of visitor.
      • accept

        public void accept​(VoidDocumentVisitor visitor)
        Accepts a visitor with the Document. Calls visitNumber of visitor.
        Specified by:
        accept in interface Document
        Parameters:
        visitor - Visitor to dispatch to.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object