Class TraceabilityIterator
- java.lang.Object
-
- fr.gouv.vitam.worker.common.utils.TraceabilityIterator
-
- All Implemented Interfaces:
java.util.Iterator<LogbookOperation>
public class TraceabilityIterator extends java.lang.Object implements java.util.Iterator<LogbookOperation>
traceability iterator : help to compute endDate of events and iterator size
-
-
Constructor Summary
Constructors Constructor Description TraceabilityIterator(com.mongodb.client.MongoCursor<LogbookOperation> mongoCursor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
endDate()
long
getNumberOfLine()
boolean
hasNext()
Returnstrue
if the iteration has more elements.LogbookOperation
next()
Returns the next element in the iteration.
-
-
-
Constructor Detail
-
TraceabilityIterator
public TraceabilityIterator(com.mongodb.client.MongoCursor<LogbookOperation> mongoCursor)
- Parameters:
mongoCursor
- of logbook operation
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returnstrue
if the iteration has more elements. (In other words, returnstrue
ifnext()
would return an element rather than throwing an exception.)- Specified by:
hasNext
in interfacejava.util.Iterator<LogbookOperation>
- Returns:
true
if the iteration has more elements
-
next
public LogbookOperation next()
Returns the next element in the iteration.- Specified by:
next
in interfacejava.util.Iterator<LogbookOperation>
- Returns:
- the next element in the iteration
-
endDate
public java.lang.String endDate()
- Returns:
- the last date of document or event
-
getNumberOfLine
public long getNumberOfLine()
- Returns:
- size of the iterator
-
-