mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 06:58:41 +00:00
Reformat business-delegate, callback, chain, command, composite, dao, decorator & dependency-injection patterns.
This commit is contained in:
+11
-12
@@ -2,21 +2,20 @@ package com.iluwatar.dependency.injection;
|
||||
|
||||
/**
|
||||
*
|
||||
* AdvancedWizard implements inversion of control.
|
||||
* It depends on abstraction that can be injected through
|
||||
* its constructor.
|
||||
* AdvancedWizard implements inversion of control. It depends on abstraction that can be injected
|
||||
* through its constructor.
|
||||
*
|
||||
*/
|
||||
public class AdvancedWizard implements Wizard {
|
||||
|
||||
private Tobacco tobacco;
|
||||
|
||||
public AdvancedWizard(Tobacco tobacco) {
|
||||
this.tobacco = tobacco;
|
||||
}
|
||||
private Tobacco tobacco;
|
||||
|
||||
@Override
|
||||
public void smoke() {
|
||||
tobacco.smoke(this);
|
||||
}
|
||||
public AdvancedWizard(Tobacco tobacco) {
|
||||
this.tobacco = tobacco;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void smoke() {
|
||||
tobacco.smoke(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user