Sync Factory Method, Abstract Factory, Builder, Prototype to Java 25; fix post/code mismatches
This commit is contained in:
14
01-creational/abstract-factory/DarkThemeFactory.java
Normal file
14
01-creational/abstract-factory/DarkThemeFactory.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package abstractfactory;
|
||||
|
||||
public class DarkThemeFactory implements UIFactory {
|
||||
|
||||
@Override
|
||||
public Button createButton() {
|
||||
return new DarkButton(); // Only Dark products come from this factory
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextField createTextField() {
|
||||
return new DarkTextField();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user