Class NullDocument

    • Constructor Detail

      • NullDocument

        public NullDocument()
    • Method Detail

      • unwrap

        public Object unwrap()
        Unwraps NullDocument as null.
        Specified by:
        unwrap in interface Document
        Returns:
        null
      • 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.
      • isNull

        public boolean isNull()
        Description copied from interface: Document
        Checks if the document is a null value.
        Specified by:
        isNull in interface Document
        Returns:
        true ,since this is a Document Null.
      • 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 visitNull of visitor.
      • accept

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

        public int hashCode()
        Overrides:
        hashCode in class Object