Class MapDocument

    • Constructor Detail

      • MapDocument

        public MapDocument​(Map<String,​Document> documentMap)
        Create a New MapDocument with Map of Document value as passed in constructor
        Parameters:
        documentMap - ListDocument documentList.
    • Method Detail

      • 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.
        Specified by:
        unwrap in interface Document
        Returns:
        Returns the Map with Keys as String and Values as Map<Object>.
      • asBoolean

        public boolean asBoolean()
        Description copied from interface: Document
        Gets the document as a boolean if it is a boolean.
        Specified by:
        asBoolean in interface Document
        Returns:
        UnsupportedOperationException
      • asString

        public String asString()
        Description copied from interface: Document
        Gets the document as a String.
        Specified by:
        asString in interface Document
        Returns:
        UnsupportedOperationException
      • isMap

        public boolean isMap()
        Specified by:
        isMap in interface Document
        Returns:
        UnsupportedOperationException
      • 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:
        unmodifiableMap of the Map of Documents in the {MapDocument}.
      • asList

        public List<Document> asList()
        Description copied from interface: Document
        Gets the document as a List if it is a document type array.

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

        Specified by:
        asList in interface Document
        Returns:
        UnsupportedOperationException
      • 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 visitMap of visitor.
      • accept

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

        public int hashCode()
        Overrides:
        hashCode in class Object