public class ServerInfoComparator extends Object implements Comparator<ServerInfo>
SortedArray
of unique ServerInfos using the comparator.Modifier and Type | Field and Description |
---|---|
static ServerInfoComparator |
INSTANCE
Single instance of the ServerInfoComparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(ServerInfo s1,
ServerInfo s2) |
static ServerInfo |
findItem(ServerInfo serverInfo,
SortedArray.IndexUpdater indexUpdater)
Find a ServerInfo or creates it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public static final ServerInfoComparator INSTANCE
public static ServerInfo findItem(ServerInfo serverInfo, SortedArray.IndexUpdater indexUpdater)
serverInfo
- Server InfoindexUpdater
- Index Updater to call in case a new entry is madepublic int compare(ServerInfo s1, ServerInfo s2)
compare
in interface Comparator<ServerInfo>
Copyright © 2013- Suresh Mahalingam. All Rights Reserved.