Package edu.byu.hbll.box
Class ProcessResult
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<edu.byu.hbll.box.BoxDocument>
-
- edu.byu.hbll.box.ProcessResult
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<edu.byu.hbll.box.BoxDocument>
,Collection<edu.byu.hbll.box.BoxDocument>
,List<edu.byu.hbll.box.BoxDocument>
,RandomAccess
public class ProcessResult extends ArrayList<edu.byu.hbll.box.BoxDocument>
Contains the result of processing a batch of documents.- Author:
- Charles Draper
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description ProcessResult()
Creates an emptyProcessResult
.ProcessResult(edu.byu.hbll.box.BoxDocument... documents)
Creates a newProcessResult
by adding the initial documents.ProcessResult(Collection<? extends edu.byu.hbll.box.BoxDocument> documents)
Creates a newProcessResult
by adding the initial documents.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessResult
addDocument(edu.byu.hbll.box.BoxDocument document)
Same as add() except returns this.ProcessResult
addDocuments(edu.byu.hbll.box.BoxDocument... documents)
Same as addAll() except returns this.ProcessResult
addDocuments(Collection<? extends edu.byu.hbll.box.BoxDocument> documents)
Same as addAll() except returns this.ProcessResult
endGroup(String groupId)
Marks the moment a group finished processing.ProcessResult
startGroup(String groupId)
Marks the start of a new group to be processed identified by the given groupId.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Constructor Detail
-
ProcessResult
public ProcessResult()
Creates an emptyProcessResult
.
-
ProcessResult
public ProcessResult(edu.byu.hbll.box.BoxDocument... documents)
Creates a newProcessResult
by adding the initial documents.- Parameters:
documents
- the resulting documents to be saved
-
ProcessResult
public ProcessResult(Collection<? extends edu.byu.hbll.box.BoxDocument> documents)
Creates a newProcessResult
by adding the initial documents.- Parameters:
documents
- the resulting documents to be saved
-
-
Method Detail
-
addDocument
public ProcessResult addDocument(edu.byu.hbll.box.BoxDocument document)
Same as add() except returns this.- Parameters:
document
- the resulting document to be saved- Returns:
- this
-
addDocuments
public ProcessResult addDocuments(edu.byu.hbll.box.BoxDocument... documents)
Same as addAll() except returns this.- Parameters:
documents
- the resulting documents to be saved- Returns:
- this
-
addDocuments
public ProcessResult addDocuments(Collection<? extends edu.byu.hbll.box.BoxDocument> documents)
Same as addAll() except returns this.- Parameters:
documents
- the resulting documents to be saved- Returns:
- this
-
startGroup
public ProcessResult startGroup(String groupId)
Marks the start of a new group to be processed identified by the given groupId. This is necessary for identifying orphaned documents and deleting them when they're no longer part of the group.- Parameters:
groupId
- the group's id- Returns:
- this
-
endGroup
public ProcessResult endGroup(String groupId)
Marks the moment a group finished processing. This is necessary for identifying orphaned documents and deleting them when they're no longer part of the group.- Parameters:
groupId
- the group's id- Returns:
- this
-
-