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.


Field Summary
private  java.lang.Object[] buf
           
private  int firstSlot
           
private  int nextSlot
           
 
Constructor Summary
CircleBuffer(int size)
           
 
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, registerNatives, toString, wait, wait, wait
 

Field Detail

buf

private java.lang.Object[] buf

firstSlot

private int firstSlot

nextSlot

private int nextSlot
Constructor Detail

CircleBuffer

public CircleBuffer(int size)
Method Detail

add

public void add(java.lang.Object item)

getContents

public java.lang.String getContents()