org.jwarp.util.recycle
Interface IRecycleBin

All Known Implementing Classes:
Container, LimitedContainer, ControlledContainer

public interface IRecycleBin

This interface standardize the behaviour of a RecycleBin object, used to contain a pool of Recyclable objects. It also handles the process of storing and managing the recyclable objects it contains.

Author:
Anatole Tresch

Method Summary
 java.util.Iterator getAllRecyclables()
          Returns all recyclable objects given the id
 IRecyclable 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(IRecyclable object)
          This method is called to recycle a recyclable object into this container.
 

Method Detail

getRecyclable

public IRecyclable getRecyclable()
This method is called to obtain a recyclable object from this recycle bin.
Throws:
RecycleBinIsEmpty - when recycle bin is empty.

getAllRecyclables

public java.util.Iterator getAllRecyclables()
Returns all recyclable objects given the id
Returns:
all recyclables contained within the object

recycle

public void recycle(IRecyclable object)
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.
Throws:
ObjectWasDestroyed - when object is destroied.

getSize

public int getSize()
This method returns the actual number of recyclable objects contained in this recycle bin.

©   O R C A   S y s t e m s