Class BooleanDocument

java.lang.Object
software.amazon.awssdk.core.document.internal.BooleanDocument
All Implemented Interfaces:
Serializable, Document

@Immutable public final class BooleanDocument extends Object implements Document
Represents a Boolean Document.
See Also:
  • Constructor Details

    • BooleanDocument

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

    • 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.
    • asNumber

      public SdkNumber asNumber()
      Specified by:
      asNumber in interface Document
      Returns:
      Returns the SdkNumber.
    • asMap

      public Map<String,Document> asMap()
      Specified by:
      asMap in interface Document
      Returns:
      Returns the Document map.
    • asList

      public List<Document> asList()
      Specified by:
      asList in interface Document
      Returns:
      Returns the lists of Document.
    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object