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

Type Parameters:
PropertyType - the type of properties this container shall store
All Superinterfaces:
Iterable<PropertyType>
All Known Subinterfaces:
LaraBOMemory<BO>, LaraCapacityManageableContainer<PropertyType>, LaraLimitedRetentionMemory<PropertyType>, LaraMemory<PropertyType>, LaraOverwriteMemory<PropertyType>, LaraOverwriteStorage<PropertyType>, LaraStorage<PropertyType>
All Known Implementing Classes:
LDefaultLimitedCapacityBOMemory, LDefaultLimitedCapacityMemory, LDefaultLimitedCapacityOverwriteBoMemory, LDefaultLimitedCapacityOverwriteMemory, LDefaultLimitedCapacityStorage, LDefaultMemory, LDefaultSimpleStorage, LDefaultStorage

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

Defines methods to retrieve information about a container regarding its capacity and its degree of capacity utilisation.


Field Summary
static int UNLIMITED_CAPACITY
          A constant to indicate that a storage has (virtually) unlimited capacity.
 
Method Summary
 int getCapacity()
          Returns the capacity of this container, i.e. the number of items that can be stored or UNLIMITED_CAPACITY (the default) if it is (virtually) unlimited.
 int getSize()
          Returns the current size, i.e. the number of items currently stored.
 boolean isEmpty()
          Returns true, if and only if this container is empty.
 boolean isFull()
          Returns true, if and only if this container is full (see also LaraCapacityManager).
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

UNLIMITED_CAPACITY

static final int UNLIMITED_CAPACITY
A constant to indicate that a storage has (virtually) unlimited capacity.

See Also:
Constant Field Values
Method Detail

getCapacity

int getCapacity()
Returns the capacity of this container, i.e. the number of items that can be stored or UNLIMITED_CAPACITY (the default) if it is (virtually) unlimited.

Returns:
the capacity of this storage.

getSize

int getSize()
Returns the current size, i.e. the number of items currently stored.

Returns:
the current size, i.e. the number of items currently stored.

isEmpty

boolean isEmpty()
Returns true, if and only if this container is empty.

Returns:
true, if and only if this container is empty.0

isFull

boolean isFull()
Returns true, if and only if this container is full (see also LaraCapacityManager).

Returns:
true, if and only if this container is full.