mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
IDEA Generify
This commit is contained in:
parent
3013e88103
commit
78d6321f9f
1 changed files with 3 additions and 3 deletions
|
@ -13,12 +13,12 @@ public class EventManager {
|
|||
public static final int INITIAL_HANDLERS_SIZE = 16;
|
||||
public class Entry
|
||||
{
|
||||
public Entry(EventHandler func, UUID[] events) {
|
||||
public Entry(EventHandler<EventInterface> func, UUID[] events) {
|
||||
this.func = func;
|
||||
this.events = events;
|
||||
}
|
||||
|
||||
EventHandler func;
|
||||
EventHandler<EventInterface> func;
|
||||
UUID[] events;
|
||||
}
|
||||
public class QueueEntry
|
||||
|
@ -33,7 +33,7 @@ public QueueEntry(EventInterface event, UUID key) {
|
|||
}
|
||||
public ArrayList<Entry> handlers = new ArrayList<>(INITIAL_HANDLERS_SIZE);
|
||||
public BlockingQueue<QueueEntry> queue = new LinkedBlockingQueue<>(QUEUE_MAX_SIZE); //Максимальный размер очереди
|
||||
public int registerHandler(EventHandler func, UUID[] events)
|
||||
public int registerHandler(EventHandler<EventInterface> func, UUID[] events)
|
||||
{
|
||||
Arrays.sort(events);
|
||||
handlers.add(new Entry(func,events));
|
||||
|
|
Loading…
Reference in a new issue