Interface MaterialBuilder<T extends Material>
- Type Parameters:
T- the type of material being built
- All Known Implementing Classes:
EBookBuilder
public interface MaterialBuilder<T extends Material>
Builder interface for creating Material instances.
Provides a fluent interface for constructing complex material 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 material instance.- Returns:
- the built material
- 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.
-