org.apache.java.recycle
Class ControlledContainer

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

public class ControlledContainer
extends java.lang.Object
implements RecycleBin

This class wraps around a RecycleBin to control it with a given controller.

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

Field Summary
private  RecycleBin container
           
private  Controller controller
           
 
Constructor Summary
ControlledContainer(RecycleBin container, Controller controller)
           
 
Method Summary
 Recyclable getRecyclable()
          This method is called to obtain a recyclable object from this recycle bin.
 int getSize()
          This method returns the actual number of recyclable objects contained in this recycle bin.
 void recycle(Recyclable object)
          This method is called to recycle a recyclable object into this container.
 
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

controller

private Controller controller
Constructor Detail

ControlledContainer

public ControlledContainer(RecycleBin container,
                           Controller controller)
Method Detail

getRecyclable

public Recyclable getRecyclable()
Description copied from interface: RecycleBin
This method is called to obtain a recyclable object from this recycle bin.
Specified by:
getRecyclable in interface RecycleBin
Tags copied from interface: RecycleBin
Throws:
RecycleBinIsEmpty - when recycle bin is empty.

recycle

public void recycle(Recyclable object)
Description copied from interface: RecycleBin
This method is called to recycle a recyclable object into this container. The clean() method is guaranteed to be called by the RecycleBin implementation before the object is stored.
Specified by:
recycle in interface RecycleBin
Tags copied from interface: RecycleBin
Throws:
ObjectWasDestroyed - when object is destroied.

getSize

public int getSize()
Description copied from interface: RecycleBin
This method returns the actual number of recyclable objects contained in this recycle bin.
Specified by:
getSize in interface RecycleBin