soc.util
Class CappedQueue<T>

java.lang.Object
  extended by soc.util.CappedQueue<T>

public class CappedQueue<T>
extends java.lang.Object

This queue has a size limit


Field Summary
private  int sizeLimit
           
private  java.util.Vector<T> vec
           
 
Constructor Summary
CappedQueue()
          constructor
CappedQueue(int s)
          constructor
 
Method Summary
 boolean empty()
          DOCUMENT ME!
 T get()
          DOCUMENT ME!
 void put(T o)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vec

private java.util.Vector<T> vec

sizeLimit

private int sizeLimit
Constructor Detail

CappedQueue

public CappedQueue()
constructor


CappedQueue

public CappedQueue(int s)
constructor

Parameters:
s - the size limit
Method Detail

put

public void put(T o)
         throws CutoffExceededException
DOCUMENT ME!

Parameters:
o - DOCUMENT ME!
Throws:
CutoffExceededException - DOCUMENT ME!

get

public T get()
DOCUMENT ME!

Returns:
DOCUMENT ME!

empty

public boolean empty()
DOCUMENT ME!

Returns:
DOCUMENT ME!