Add creational patterns, Interpreter; remove scripts; update README
This commit is contained in:
11
01-creational/factory-method/PushService.java
Normal file
11
01-creational/factory-method/PushService.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package factorymethod;
|
||||
|
||||
public class PushService extends NotificationService {
|
||||
private final String token;
|
||||
public PushService(String token) { this.token = token; }
|
||||
|
||||
@Override
|
||||
protected Notification createNotification() {
|
||||
return new PushNotification(token);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user