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.StringendDate()longgetNumberOfLine()booleanhasNext()Returnstrueif the iteration has more elements.LogbookOperationnext()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()
Returnstrueif the iteration has more elements. (In other words, returnstrueifnext()would return an element rather than throwing an exception.)- Specified by:
hasNextin interfacejava.util.Iterator<LogbookOperation>- Returns:
trueif the iteration has more elements
-
next
public LogbookOperation next()
Returns the next element in the iteration.- Specified by:
nextin 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
-
-