Package org.codelibs.fess.util
Class DocList
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Map<String,,Object>> Collection<Map<String,,Object>> List<Map<String,,Object>> RandomAccess,SequencedCollection<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:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContentSize(long contentSize) Adds to the total content size of this document list.voidaddProcessingTime(long processingTime) Adds to the total processing time of this document list.voidclear()Clears all documents from the list and resets metrics.longGets the total content size of all documents in this list.longGets the total processing time for all documents in this list.toString()Returns a string representation of this DocList including metrics and content.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAllMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
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. -
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
Returns a string representation of this DocList including metrics and content.- Overrides:
toStringin classAbstractCollection<Map<String,Object>> - Returns:
- a string representation including content size, processing time, and elements
-