Package ch.cern.dirq

Class QueueSimple.QueueSimpleIterator

java.lang.Object
ch.cern.dirq.QueueSimple.QueueSimpleIterator
All Implemented Interfaces:
Iterator<String>
Enclosing class:
QueueSimple

private static class QueueSimple.QueueSimpleIterator extends Object implements Iterator<String>
Iterator for the simple directory queue (private).
  • Field Details

  • Constructor Details

    • QueueSimpleIterator

      QueueSimpleIterator(QueueSimple queue)
      Constructor for the simple directory queue iterator.
      Parameters:
      queue - queue to be iterated on
  • Method Details

    • buildElements

      private boolean buildElements()
      Helper method to build the list of elements to iterate over.
    • hasNext

      public boolean hasNext()
      Returns true if the iteration has more elements.
      Specified by:
      hasNext in interface Iterator<String>
    • next

      public String next()
      Returns the next element in the iteration.
      Specified by:
      next in interface Iterator<String>
    • remove

      public void remove()
      Removes from the underlying collection the last element returned by this iterator.
      Specified by:
      remove in interface Iterator<String>