Class BooleanDocument

    • Constructor Detail

      • BooleanDocument

        public BooleanDocument​(boolean value)
        Create a New BooleanDocument with boolean value as passed in constructor
        Parameters:
        value - boolean value.
    • Method Detail

      • unwrap

        public Object unwrap()
        Unwraps the Document Boolean to a Boolean Object.
        Specified by:
        unwrap in interface Document
        Returns:
        boolean value.
      • isBoolean

        public boolean isBoolean()
        Indicates this is a Boolean Document.
        Specified by:
        isBoolean in interface Document
        Returns:
        true since this is a Boolean Document.
      • asBoolean

        public boolean asBoolean()
        Gets the boolean value of the Document.
        Specified by:
        asBoolean in interface Document
        Returns:
        boolean value.
      • asString

        public String asString()
        Specified by:
        asString in interface Document
        Returns:
        Returns the string value.
      • 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 visitBoolean of visitor.
      • accept

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

        public int hashCode()
        Overrides:
        hashCode in class Object