Add all 23 GoF design pattern implementations
This commit is contained in:
11
01-creational/factory-method/Notification.java
Normal file
11
01-creational/factory-method/Notification.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package factorymethod;
|
||||
|
||||
public interface Notification {
|
||||
|
||||
// Every notification must know how to deliver itself
|
||||
void send(String recipient, String message);
|
||||
|
||||
// Used by the Creator for logging — it needs to know the type
|
||||
// without knowing the concrete class
|
||||
String getType();
|
||||
}
|
||||
Reference in New Issue
Block a user