Class MessageBatch.BatchIterator

  • All Implemented Interfaces:
    java.util.Iterator<Message>, MessageIterator
    Enclosing class:
    MessageBatch

    protected class MessageBatch.BatchIterator
    extends java.lang.Object
    implements MessageIterator
    Iterates over non-null elements of a batch, skipping null elements
    • Constructor Summary

      Constructors 
      Constructor Description
      BatchIterator​(int saved_index)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      Message next()  
      void remove()  
      void replace​(Message msg)
      Replaces the message at the current index with msg
      • 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
    • Field Detail

      • current_index

        protected int current_index
      • saved_index

        protected final int saved_index
    • Constructor Detail

      • BatchIterator

        public BatchIterator​(int saved_index)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Message>
      • next

        public Message next()
        Specified by:
        next in interface java.util.Iterator<Message>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<Message>