Files
design-patterns/01-creational/factory-method/Notification.java

12 lines
300 B
Java

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();
}