All Packages Class Hierarchy This Package Previous Next Index
Class EDU.gatech.cc.is.util.CircularBufferEnumeration
java.lang.Object
|
+----EDU.gatech.cc.is.util.CircularBufferEnumeration
- public class CircularBufferEnumeration
- extends Object
- implements Enumeration, Cloneable, Serializable
Implements an enumeration of items in a circular buffer.
Copyright
(c)1998 Tucker Balch
- Version:
- $Revision: 1.4 $
- Author:
- Tucker Balch
-
position
- the last cell read.
-
total
- total number of items ever read from the buffer by this enumeration.
-
CircularBufferEnumeration(CircularBuffer)
- create a CircularBufferEnumeration with a circular buffer.
-
hasMoreElements()
- Tests if this enumeration contains more elements.
-
main(String[])
- Tests circular buffer enumeration.
-
nextElement()
- Returns the next element of this enumeration.
position
protected int position
- the last cell read.
total
protected int total
- total number of items ever read from the buffer by this enumeration.
CircularBufferEnumeration
public CircularBufferEnumeration(CircularBuffer cb)
- create a CircularBufferEnumeration with a circular buffer.
- Parameters:
- cb - CircularBuffer, the buffer to enumerate.
hasMoreElements
public boolean hasMoreElements()
- Tests if this enumeration contains more elements.
- Returns:
- true if this enumeration contains more elements;
false otherwise.
nextElement
public Object nextElement() throws NoSuchElementException
- Returns the next element of this enumeration.
- Returns:
- the next element of this enumeration.
main
public static void main(String args[])
- Tests circular buffer enumeration.
All Packages Class Hierarchy This Package Previous Next Index