info.monitorenter.util.collections
Class RingBufferArrayFast.ARingBufferIterator

java.lang.Object
  extended by info.monitorenter.util.collections.RingBufferArrayFast.ARingBufferIterator
All Implemented Interfaces:
Iterator
Enclosing class:
RingBufferArrayFast

protected abstract class RingBufferArrayFast.ARingBufferIterator
extends Object
implements Iterator

Base for ringbuffer iterators that has access to the ringbuffer by being an non-static inner class.

Version:
$Revision: 1.7 $
Author:
Achim Westermann

Field Summary
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
 boolean hasNext()
           
protected abstract  void incPos()
          Increment the internal read position pointer.
 Object next()
           
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator
See Also:
Iterator.hasNext()

incPos

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


next

public Object next()
Specified by:
next in interface Iterator
See Also:
Iterator.next()

remove

public void remove()
            throws UnsupportedOperationException
Not supported.

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException - always as this is not supported.
See Also:
Iterator.remove()


Copyright © 2001 - 2007 LGPL, All Rights Footloose.