PrintDecorator
public class CompoundDecorator extends java.lang.Object implements PrintDecorator
Constructor | Description |
---|---|
CompoundDecorator(PrintDecorator[] decorators) |
Constructs a CompoundDecorator.
|
Modifier and Type | Method | Description |
---|---|---|
Print |
decorate(Print target) |
Wraps the target in a decoration.
|
public CompoundDecorator(PrintDecorator[] decorators)
decorators
- the decorators, in order from innermost to outermost.public Print decorate(Print target)
PrintDecorator
decorate
in interface PrintDecorator
target
- the print to wrap with a decoration.