mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-04 08:13:20 +00:00
Generic For AbstractPrinterController #324
This commit is contained in:
1 parent
74d1823078
commit
982f9f5e31
1 file changed
+3
-3
+3
-3
@@ -2,13 +2,13 @@ package com.iluwatar.delegation.simple;
|
||||
|
||||
public abstract class AbstractPrinterController<T extends Printer> implements Printer{
|
||||
|
||||
private Printer printer;
|
||||
private T printer;
|
||||
|
||||
public AbstractPrinterController(Printer printer) {
|
||||
public AbstractPrinterController(T printer) {
|
||||
this.printer = printer;
|
||||
}
|
||||
|
||||
protected Printer getPrinter() {
|
||||
protected T getPrinter() {
|
||||
return printer;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user