Interface ComponentBuilder<T extends MaterialComponent>
- Type Parameters:
T- the type of component being built
- All Known Implementing Classes:
MaterialBundleBuilder
public interface ComponentBuilder<T extends MaterialComponent>
Builder interface for creating MaterialComponent instances.
Provides a fluent interface for constructing complex component objects.
This interface demonstrates the Builder pattern by providing a way to construct complex objects step by step with a fluent interface.
- Since:
- 2024-09-15
- Version:
- 3.0
- Author:
- Navid Mohaghegh
-
Method Summary
-
Method Details
-
build
T build()Builds and returns the component instance.- Returns:
- the built component
- Throws:
IllegalStateException- if required fields are missing or invalid
-
validate
void validate()Validates that all required fields are set.- Throws:
IllegalStateException- if validation fails
-
reset
void reset()Resets the builder to its initial state.
-