Interface IComponentContainer<E extends IAndroidComponent>

Type Parameters:
E - The type of Android component inside this container
All Superinterfaces:
Iterable<E>
All Known Implementing Classes:
EagerComponentContainer, EmptyComponentContainer

public interface IComponentContainer<E extends IAndroidComponent> extends Iterable<E>
Container for (potentially delay-loaded) components inside an Android app
Author:
Steven Arzt
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the components in this container as a list
    Gets the component with the given unique class name
    default boolean
    Checks whether a component with the given unique class name exists
    boolean
    Checks whether this container is empty, i.e., does not contain any components

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • asList

      List<E> asList()
      Gets the components in this container as a list
      Returns:
      A list that contains all the components in this container
    • getComponentByName

      E getComponentByName(String name)
      Gets the component with the given unique class name
      Parameters:
      name - The name of the class that implements the component
      Returns:
      The component definition for the given class name, or null if no such component exists
    • hasComponentByName

      default boolean hasComponentByName(String name)
      Checks whether a component with the given unique class name exists
      Parameters:
      name - The name of the class that implements the component
      Returns:
      True if this container contains an Android component that is implemented by a class with the given name, false otherwise
    • isEmpty

      boolean isEmpty()
      Checks whether this container is empty, i.e., does not contain any components
      Returns:
      True if this container is empty, false otherwise