Java tutorial
//package com.java2s; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; public class Main { public static Map<Object, Object> events = new HashMap<Object, Object>(); public static synchronized Set<Object> getRegistered() { return new HashSet<Object>(events.keySet()); } }