Add creational patterns, Interpreter; remove scripts; update README
This commit is contained in:
11
01-creational/factory-method/PushNotification.java
Normal file
11
01-creational/factory-method/PushNotification.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package factorymethod;
|
||||
|
||||
public class PushNotification implements Notification {
|
||||
private final String deviceToken;
|
||||
public PushNotification(String deviceToken) { this.deviceToken = deviceToken; }
|
||||
|
||||
@Override
|
||||
public void send(String message) {
|
||||
System.out.println("Push -> " + deviceToken + ": " + message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user