Class DocList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Map<String,Object>>, Collection<Map<String,Object>>, List<Map<String,Object>>, RandomAccess, SequencedCollection<Map<String,Object>>

public class DocList extends ArrayList<Map<String,Object>>
A specialized ArrayList for storing document data with additional metadata. This class extends ArrayList to hold document maps while tracking content size and processing time metrics. It's used throughout the Fess search system to manage collections of search results and crawled documents.
See Also:
  • Constructor Details

    • DocList

      public DocList()
      Default constructor for DocList. Creates a new empty document list with zero content size and processing time.
  • Method Details

    • clear

      public void clear()
      Clears all documents from the list and resets metrics. Removes all documents and resets content size and processing time to zero.
      Specified by:
      clear in interface Collection<Map<String,Object>>
      Specified by:
      clear in interface List<Map<String,Object>>
      Overrides:
      clear in class ArrayList<Map<String,Object>>
    • getContentSize

      public long getContentSize()
      Gets the total content size of all documents in this list.
      Returns:
      the total content size in bytes
    • addContentSize

      public void addContentSize(long contentSize)
      Adds to the total content size of this document list.
      Parameters:
      contentSize - the content size to add in bytes
    • getProcessingTime

      public long getProcessingTime()
      Gets the total processing time for all documents in this list.
      Returns:
      the total processing time in milliseconds
    • addProcessingTime

      public void addProcessingTime(long processingTime)
      Adds to the total processing time of this document list.
      Parameters:
      processingTime - the processing time to add in milliseconds
    • toString

      public String toString()
      Returns a string representation of this DocList including metrics and content.
      Overrides:
      toString in class AbstractCollection<Map<String,Object>>
      Returns:
      a string representation including content size, processing time, and elements