Browse Source

Removed unneeded parents so eclipse can compile the project

Fairly sure this is an eclipse issue, no problems are reported in idea...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=474593
Jared 5 years ago
parent
commit
a271cd8fd7
No account linked to committer's email address
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      Shared/src/main/java/listeners/ListenerList.java

+ 7
- 7
Shared/src/main/java/listeners/ListenerList.java View File

6
     public static final int PRIORITY_HIGH = 100;
6
     public static final int PRIORITY_HIGH = 100;
7
     public static final int PRIORITY_DEFAULT = 0;
7
     public static final int PRIORITY_DEFAULT = 0;
8
     public static final int PRIORITY_LOW = -100;
8
     public static final int PRIORITY_LOW = -100;
9
-    private ListenerList<T>.EventListenerNode first = null;
10
-    private ListenerList<T>.EventListenerNode last = null;
9
+    private EventListenerNode first = null;
10
+    private EventListenerNode last = null;
11
     
11
     
12
     public ListenerHandle<T> add(T listener) {
12
     public ListenerHandle<T> add(T listener) {
13
         return this.add(listener, ListenerList.PRIORITY_DEFAULT);
13
         return this.add(listener, ListenerList.PRIORITY_DEFAULT);
14
     }
14
     }
15
     
15
     
16
     public ListenerHandle<T> add(T listener, int priority) {
16
     public ListenerHandle<T> add(T listener, int priority) {
17
-        ListenerList<T>.EventListenerNode node = new ListenerList<T>.EventListenerNode(listener, priority);
17
+        EventListenerNode node = new EventListenerNode(listener, priority);
18
         if (first == null) {
18
         if (first == null) {
19
             this.first = this.last = node;
19
             this.first = this.last = node;
20
         }
20
         }
21
         else {
21
         else {
22
-            ListenerList<T>.EventListenerNode previousNode = last;
22
+            EventListenerNode previousNode = last;
23
             while (previousNode != null && priority > previousNode.priority)
23
             while (previousNode != null && priority > previousNode.priority)
24
                 previousNode = previousNode.prev;
24
                 previousNode = previousNode.prev;
25
             if (previousNode == null) {
25
             if (previousNode == null) {
44
     }
44
     }
45
     
45
     
46
     public void accept(Consumer<T> consumer) {
46
     public void accept(Consumer<T> consumer) {
47
-        ListenerList<T>.EventListenerNode current = first;
47
+        EventListenerNode current = first;
48
         while (current != null) {
48
         while (current != null) {
49
             consumer.accept(current.listener);
49
             consumer.accept(current.listener);
50
             current = current.next;
50
             current = current.next;
57
     private final class EventListenerNode implements ListenerHandle<T>, AutoCloseable {
57
     private final class EventListenerNode implements ListenerHandle<T>, AutoCloseable {
58
         public final T listener;
58
         public final T listener;
59
         private final int priority;
59
         private final int priority;
60
-        private ListenerList<T>.EventListenerNode next = null;
61
-        private ListenerList<T>.EventListenerNode prev = null;
60
+        private EventListenerNode next = null;
61
+        private EventListenerNode prev = null;
62
         
62
         
63
         public EventListenerNode(T listener, int priority) {
63
         public EventListenerNode(T listener, int priority) {
64
             this.listener = listener;
64
             this.listener = listener;

Loading…
Cancel
Save