Author: j16sdiz
Date: 2008-09-08 13:08:50 +0000 (Mon, 08 Sep 2008)
New Revision: 22562
Modified:
trunk/freenet/src/freenet/node/NetworkIDManager.java
Log:
Generic: Compartor -> Comparator<...>
Modified: trunk/freenet/src/freenet/node/NetworkIDManager.java
===================================================================
--- trunk/freenet/src/freenet/node/NetworkIDManager.java 2008-09-08
13:08:29 UTC (rev 22561)
+++ trunk/freenet/src/freenet/node/NetworkIDManager.java 2008-09-08
13:08:50 UTC (rev 22562)
@@ -29,7 +29,7 @@
* @author robert
* @created 2008-02-06
*/
-public class NetworkIDManager implements Runnable, Comparator {
+public class NetworkIDManager implements Runnable,
Comparator<NetworkIDManager.PeerNetworkGroup> {
public static boolean disableSecretPings = true;
public static boolean disableSecretPinger = true;
public static boolean disableSwapSegregation = true;
@@ -997,9 +997,7 @@
* Orders PeerNetworkGroups by size largest first. Determines the
priority-order in the master list.
* Throws on comparison of non-network-groups or those without members
assigned.
*/
- public int compare(Object a1, Object b1) {
- PeerNetworkGroup a=(PeerNetworkGroup)a1;
- PeerNetworkGroup b=(PeerNetworkGroup)b1;
+ public int compare(PeerNetworkGroup a, PeerNetworkGroup b) {
//since we want largest-first, this is backwards of what it
would normally be (a-b).
return b.members.size()-a.members.size();
}