Class DefaultDocument

  • All Implemented Interfaces:
    Document, java.io.Serializable

    public class DefaultDocument
    extends java.lang.Object
    implements Document, java.io.Serializable
    Default implementation of Document.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultDocument()
      Creates an empty document.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<java.lang.String> getFieldNames()
      Returns the field names defined in this document.
      java.util.Map<java.lang.String,​java.lang.Object> getFields()
      Returns the fields defined in this document.
      java.lang.Object getFieldValue​(java.lang.String fieldName)
      Returns the value or collection of values for a given field.
      java.util.Set<java.lang.String> getTags()
      Returns the tags defined in this document.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultDocument

        public DefaultDocument()
        Creates an empty document.
    • Method Detail

      • getFieldNames

        public java.util.Collection<java.lang.String> getFieldNames()
        Description copied from interface: Document
        Returns the field names defined in this document.
        Specified by:
        getFieldNames in interface Document
        Returns:
        the field names defined in this document
      • getFieldValue

        public java.lang.Object getFieldValue​(java.lang.String fieldName)
        Description copied from interface: Document
        Returns the value or collection of values for a given field.
        Specified by:
        getFieldValue in interface Document
        Returns:
        the value or collection of values for a given field
      • getFields

        public java.util.Map<java.lang.String,​java.lang.Object> getFields()
        Description copied from interface: Document
        Returns the fields defined in this document.
        Specified by:
        getFields in interface Document
        Returns:
        the fields defined in this document
      • getTags

        public java.util.Set<java.lang.String> getTags()
        Description copied from interface: Document
        Returns the tags defined in this document.
        Specified by:
        getTags in interface Document
        Returns:
        the tags defined in this document