소스 검색

Extract EqualComparator for use elsewhere

Change-Id: Ibd33c90c8935ff59d8b276061c2023fe19dd50a0
Reviewed-on: http://gerrit.dmdirc.com/1133
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Automatic-Compile: Gregory Holmes <greg@dmdirc.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.4
Chris Smith 14 년 전
부모
커밋
585fff1f77
2개의 변경된 파일39개의 추가작업 그리고 16개의 파일을 삭제
  1. 39
    0
      src/com/dmdirc/util/EqualComparator.java
  2. 0
    16
      src/com/dmdirc/util/ListenerList.java

+ 39
- 0
src/com/dmdirc/util/EqualComparator.java 파일 보기

@@ -0,0 +1,39 @@
1
+/*
2
+ * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+
23
+package com.dmdirc.util;
24
+
25
+import java.util.Comparator;
26
+
27
+/**
28
+ * A comparator that says any two objects are equal.
29
+ *
30
+ * @since 0.6.4
31
+ */
32
+public class EqualComparator implements Comparator<Object> {
33
+
34
+    /** {@inheritDoc} */
35
+    @Override
36
+    public int compare(final Object o1, final Object o2) {
37
+        return 0;
38
+    }
39
+}

+ 0
- 16
src/com/dmdirc/util/ListenerList.java 파일 보기

@@ -23,7 +23,6 @@
23 23
 package com.dmdirc.util;
24 24
 
25 25
 import java.util.Collection;
26
-import java.util.Comparator;
27 26
 import java.util.HashMap;
28 27
 import java.util.Map;
29 28
 import java.util.concurrent.ConcurrentSkipListSet;
@@ -130,19 +129,4 @@ public class ListenerList {
130 129
         }
131 130
     }
132 131
 
133
-    /**
134
-     * A comparator that says any two objects are equal.
135
-     *
136
-     * @since 0.6.4
137
-     */
138
-    protected static class EqualComparator implements Comparator<Object> {
139
-
140
-        /** {@inheritDoc} */
141
-        @Override
142
-        public int compare(final Object o1, final Object o2) {
143
-            return 0;
144
-        }
145
-
146
-    }
147
-
148 132
 }

Loading…
취소
저장