arlut.csd.Util
Class CircleBuffer
java.lang.Object
|
+--arlut.csd.Util.CircleBuffer
- public class CircleBuffer
- extends java.lang.Object
This class defines a fixed size circular buffer that can be used to
keep references to the last n objects added to the buffer.
This class is intended to be used as a debugging tool, so there are
no methods to dequeue items, just to add items and to display the last n
items submitted.
|
Method Summary |
void |
add(java.lang.Object item)
|
java.lang.String |
getContents()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buf
private java.lang.Object[] buf
firstSlot
private int firstSlot
nextSlot
private int nextSlot
CircleBuffer
public CircleBuffer(int size)
add
public void add(java.lang.Object item)
getContents
public java.lang.String getContents()