Class ListDocument

    • Constructor Detail

      • ListDocument

        public ListDocument​(List<Document> documentList)
        Create a New ListDocument with List of Document documentList as passed in constructor
        Parameters:
        documentList - 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 Document and unwraps each of the document.
        Specified by:
        unwrap in interface Document
        Returns:
        Returns the List<Object>.
      • 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.
      • isList

        public boolean isList()
        Specified by:
        isList in interface Document
        Returns:
        true, since this is a Document List.
      • 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:
        unmodifiableList of the List of Documents in the {ListDocument}.
      • 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 visitList of visitor.
      • accept

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

        public int hashCode()
        Overrides:
        hashCode in class Object