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

Variable Index

 o position
the last cell read.
 o total
total number of items ever read from the buffer by this enumeration.

Constructor Index

 o CircularBufferEnumeration(CircularBuffer)
create a CircularBufferEnumeration with a circular buffer.

Method Index

 o hasMoreElements()
Tests if this enumeration contains more elements.
 o main(String[])
Tests circular buffer enumeration.
 o nextElement()
Returns the next element of this enumeration.

Variables

 o position
 protected int position
the last cell read.

 o total
 protected int total
total number of items ever read from the buffer by this enumeration.

Constructors

 o CircularBufferEnumeration
 public CircularBufferEnumeration(CircularBuffer cb)
create a CircularBufferEnumeration with a circular buffer.

Parameters:
cb - CircularBuffer, the buffer to enumerate.

Methods

 o hasMoreElements
 public boolean hasMoreElements()
Tests if this enumeration contains more elements.

Returns:
true if this enumeration contains more elements; false otherwise.
 o nextElement
 public Object nextElement() throws NoSuchElementException
Returns the next element of this enumeration.

Returns:
the next element of this enumeration.
 o main
 public static void main(String args[])
Tests circular buffer enumeration.


All Packages  Class Hierarchy  This Package  Previous  Next  Index