Created
December 17, 2012 12:13
-
-
Save anonymous/4317865 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.azyobuzi.saostar.util; | |
import java.util.HashSet; | |
public class Notificator | |
{ | |
private HashSet<Action> handlers = new HashSet<Action>(); | |
public void add(Action handler) | |
{ | |
handlers.add(handler); | |
} | |
public void remove(Action handler) | |
{ | |
handlers.remove(handler); | |
} | |
public void raise() | |
{ | |
for (Action handler : handlers) | |
handler.invoke(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ログインし忘れた