Interface ImmutableBeanGroup<K,V extends BeanInstance<K>>
- Type Parameters:
K- the bean identifier typeV- the bean instance type
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
BeanGroup<K,,V> MutableBeanGroup<K,V>
- All Known Implementing Classes:
DefaultBeanGroup,DefaultImmutableBeanGroup
Exposes the context of, and manages the lifecycle for, groups of beans.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Indicates that the caller is finished with the bean group, and that it should close any resources.getBeanInstance(K id) Returns the bean instance with the specified identifier.getId()Returns the unique identifier of this bean group.booleanisEmpty()Indicates whether or not this bean group contains and bean instances.
-
Method Details
-
getId
K getId()Returns the unique identifier of this bean group.- Returns:
- a unique identifier
-
isEmpty
boolean isEmpty()Indicates whether or not this bean group contains and bean instances.- Returns:
- true, if this bean group is empty, false otherwise
-
getBeanInstance
Returns the bean instance with the specified identifier.- Parameters:
id- a bean instance identifier- Returns:
- the requested bean instance, or null, if no such bean instance exists.
-
close
void close()Indicates that the caller is finished with the bean group, and that it should close any resources.- Specified by:
closein interfaceAutoCloseable
-