de.cesr.lara.components.container
Interface LaraCapacityManageableContainer<PropertyType extends LaraProperty<? extends PropertyType,?>>

Type Parameters:
ItemType -
All Superinterfaces:
Iterable<PropertyType>, LaraContainer<PropertyType>
All Known Subinterfaces:
LaraOverwriteMemory<PropertyType>, LaraOverwriteStorage<PropertyType>
All Known Implementing Classes:
LDefaultLimitedCapacityBOMemory, LDefaultLimitedCapacityMemory, LDefaultLimitedCapacityOverwriteBoMemory, LDefaultLimitedCapacityOverwriteMemory, LDefaultLimitedCapacityStorage, LDefaultSimpleStorage

public interface LaraCapacityManageableContainer<PropertyType extends LaraProperty<? extends PropertyType,?>>
extends LaraContainer<PropertyType>

LaraContainers implementing this interface accept a LaraCapacityManager and commit themselves to calling its LaraCapacityManager#manage(LaraCapacityManagementView)) whenever they are full and a new item is to be stored. Usually, the manager will then remove an item from the container at a position according to its strategy and thus clear space for the new item.


Field Summary
 
Fields inherited from interface de.cesr.lara.components.container.LaraContainer
UNLIMITED_CAPACITY
 
Method Summary
 LaraCapacityManagementView<PropertyType> getCapacityManagementView()
           
 LaraCapacityManager<PropertyType> getCapacityManager()
           
 boolean setCapacity(int capacity)
           
 void setCapacityManager(LaraCapacityManager<PropertyType> manager)
           
 
Methods inherited from interface de.cesr.lara.components.container.LaraContainer
getCapacity, getSize, isEmpty, isFull
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getCapacityManagementView

LaraCapacityManagementView<PropertyType> getCapacityManagementView()
Returns:

getCapacityManager

LaraCapacityManager<PropertyType> getCapacityManager()
Returns:

setCapacity

boolean setCapacity(int capacity)
Parameters:
capacity -
Returns:

setCapacityManager

void setCapacityManager(LaraCapacityManager<PropertyType> manager)
Parameters:
manager -