Class NullDocument

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

@Immutable public final class NullDocument extends Object implements Document
See Also:
  • Constructor Details

    • NullDocument

      public NullDocument()
  • Method Details

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object