Class TraceabilityIterator

  • All Implemented Interfaces:

    public class TraceabilityIterator
    extends java.lang.Object
    implements java.util.Iterator<LogbookOperation>
    traceability iterator : help to compute endDate of events and iterator size
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String endDate()  
      long getNumberOfLine()  
      boolean hasNext()
      Returns true if the iteration has more elements.
      LogbookOperation next()
      Returns the next element in the iteration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Constructor Detail

      • TraceabilityIterator

        public TraceabilityIterator​(com.mongodb.client.MongoCursor<LogbookOperation> mongoCursor)
        mongoCursor - of logbook operation
    • Method Detail

      • hasNext

        public boolean hasNext()
        Returns true if the iteration has more elements. (In other words, returns true if next() would return an element rather than throwing an exception.)
        Specified by:
        hasNext in interface java.util.Iterator<LogbookOperation>
        true if the iteration has more elements
      • next

        public LogbookOperation next()
        Returns the next element in the iteration.
        Specified by:
        next in interface java.util.Iterator<LogbookOperation>
        the next element in the iteration
      • endDate

        public java.lang.String endDate()
        the last date of document or event
      • getNumberOfLine

        public long getNumberOfLine()
        size of the iterator