Class EnvelopeIterator

java.lang.Object
ch.tocco.nice2.outputcenter.api.sorting.EnvelopeIterator
All Implemented Interfaces:
Iterator<OutputCenterInputSupplier>
Direct Known Subclasses:
MarkingEnvelopeIterator

public class EnvelopeIterator extends Object implements Iterator<OutputCenterInputSupplier>
Iterates over all documents in a set of envelopes, while giving access to status information, like the current envelope and the index of the item in the current envelope.
  • Constructor Details

    • EnvelopeIterator

      public EnvelopeIterator(SortedJobs jobs)
    • EnvelopeIterator

      public EnvelopeIterator(Iterator<Envelope> envelopes)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<OutputCenterInputSupplier>
    • next

      Specified by:
      next in interface Iterator<OutputCenterInputSupplier>
    • getCurrentEnvelope

      public Envelope getCurrentEnvelope()
      Returns the envelop currently in use.
    • getIndexInEnvelope

      public int getIndexInEnvelope()
      Returns the index of the current item in the current envelope.
    • getItemCount

      public int getItemCount()
      Returns the number of items in the current envelope.
    • isLastEnvelopeItem

      public boolean isLastEnvelopeItem()
    • isFirstEnvelopeItem

      public boolean isFirstEnvelopeItem()
    • getEnvelopeIndex

      public int getEnvelopeIndex()
      Returns the index of the current envelope.
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<OutputCenterInputSupplier>