org.apache.java.recycle
Class LimitedContainer

java.lang.Object
  |
  +--org.apache.java.recycle.LimitedContainer

public class LimitedContainer
extends java.lang.Object
implements RecycleBin

This class wraps around a container to limit its capacity.

Version:
$Revision: 1.3 $ $Date: 1999/06/24 00:50:50 $

Field Summary
private  int capacity
           
private  RecycleBin container
           
 
Constructor Summary
LimitedContainer(RecycleBin container, int capacity)
           
 
Method Summary
 Recyclable getRecyclable()
           
 int getSize()
           
 void recycle(Recyclable object)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

container

private RecycleBin container

capacity

private int capacity
Constructor Detail

LimitedContainer

public LimitedContainer(RecycleBin container,
                        int capacity)
Method Detail

getRecyclable

public Recyclable getRecyclable()
Specified by:
getRecyclable in interface RecycleBin

recycle

public void recycle(Recyclable object)
Specified by:
recycle in interface RecycleBin

getSize

public int getSize()
Specified by:
getSize in interface RecycleBin