Package Structural.Decorator
Interface Component
- All Known Implementing Classes:
ConcreteComponent,ConcreteDecoratorA,ConcreteDecoratorB,Decorator
public interface Component
The Component interface defines operations that can be dynamically modified.
-
Method Summary
Modifier and TypeMethodDescriptiondoublecost()Gets the cost of the component.Gets the description of the component.
-
Method Details
-
getDescription
String getDescription()Gets the description of the component.- Returns:
- A string description.
-
cost
double cost()Gets the cost of the component.- Returns:
- The cost as a double.
-