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
public interface ImmutableBeanGroup<K,V extends BeanInstance<K>> extends AutoCloseable
Exposes the context of, and manages the lifecycle for, groups of beans.- Author:
- Paul Ferraro
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Indicates that the caller is finished with the bean group, and that it should close any resources.VgetBeanInstance(K id)Returns the bean instance with the specified identifier.KgetId()Returns the unique identifier of this bean group.booleanisEmpty()Indicates whether or not this bean group contains and bean instances.
-
-
-
Method Detail
-
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
V getBeanInstance(K id)
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
-
-