Interface ImmutableBeanGroup<K,V extends BeanInstance<K>>

Type Parameters:
K - the bean identifier type
V - 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

    Modifier and Type
    Method
    Description
    void
    Indicates that the caller is finished with the bean group, and that it should close any resources.
    Returns the bean instance with the specified identifier.
    Returns the unique identifier of this bean group.
    boolean
    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

      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:
      close in interface AutoCloseable