Skip to content

Instantly share code, notes, and snippets.

Created December 17, 2012 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4317865 to your computer and use it in GitHub Desktop.
Save anonymous/4317865 to your computer and use it in GitHub Desktop.
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();
}
}
@azyobuzin
Copy link

ログインし忘れた

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment