mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 14:58:39 +00:00
eb396217d0
- initial commit includes a simple and advanced example of Event-driven architecture
16 lines
348 B
Java
16 lines
348 B
Java
package com.iluwatar.eda.simple;
|
|
|
|
/**
|
|
* The {@link EventHandler} class handles performs actions on {@link Event} objects
|
|
*/
|
|
public class EventHandler {
|
|
|
|
public static void handleEventA(Event e){
|
|
System.out.println(e.data);
|
|
}
|
|
|
|
public static void handleEventB(Event e){
|
|
System.out.println(e.data.toUpperCase());
|
|
}
|
|
}
|