Class RingBufferArrayFast.ARingBufferIterator

  • All Implemented Interfaces:
    java.util.Iterator<T>
    Enclosing class:
    RingBufferArrayFast<T>

    protected abstract class RingBufferArrayFast.ARingBufferIterator
    extends java.lang.Object
    implements java.util.Iterator<T>
    Base for ring buffer iterators that has access to the ring buffer by being an non-static inner class.

    Version:
    $Revision: 1.13 $
    Author:
    Achim Westermann
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int m_count
      The amount of returned instances, needed for knowing if iterator is empty.
      protected int m_pos
      The index of the next instance to return.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      boolean hasNext()  
      protected abstract void incPos()
      Increment the internal read position pointer.
      T next()  
      void remove()
      Not supported.
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Field Detail

      • m_count

        protected int m_count
        The amount of returned instances, needed for knowing if iterator is empty.
      • m_pos

        protected int m_pos
        The index of the next instance to return.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
        See Also:
        Iterator.hasNext()
      • incPos

        protected abstract void incPos()
        Increment the internal read position pointer.
      • next

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

        public void remove()
                    throws java.lang.UnsupportedOperationException
        Not supported.

        Specified by:
        remove in interface java.util.Iterator<T>
        Throws:
        java.lang.UnsupportedOperationException - always as this is not supported.
        See Also:
        Iterator.remove()