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
Container for (potentially delay-loaded) components inside an Android app
- Author:
- Steven Arzt
-
Method Summary
Modifier and TypeMethodDescriptionasList()Gets the components in this container as a listgetComponentByName(String name) Gets the component with the given unique class namedefault booleanhasComponentByName(String name) Checks whether a component with the given unique class name existsbooleanisEmpty()Checks whether this container is empty, i.e., does not contain any componentsMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
asList
Gets the components in this container as a list- Returns:
- A list that contains all the components in this container
-
getComponentByName
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
nullif no such component exists
-
hasComponentByName
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
-