Package org.astrogrid.samp.hub
Class BasicClientSet
- java.lang.Object
-
- org.astrogrid.samp.hub.BasicClientSet
-
-
Constructor Summary
Constructors Constructor Description BasicClientSet(java.util.Comparator clientIdComparator)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(HubClient client)
Adds a new client to the set.boolean
containsClient(HubClient client)
Indicates whether a given client is currently a member of this set.HubClient[]
getClients()
Returns an array of all the currently contained clients.HubClient
getFromPublicId(java.lang.String publicId)
Returns the client in the set corresponding to a given public ID.void
remove(HubClient client)
Removes a client from the set.
-
-
-
Method Detail
-
add
public void add(HubClient client)
Description copied from interface:ClientSet
Adds a new client to the set.
-
remove
public void remove(HubClient client)
Description copied from interface:ClientSet
Removes a client from the set.
-
getFromPublicId
public HubClient getFromPublicId(java.lang.String publicId)
Description copied from interface:ClientSet
Returns the client in the set corresponding to a given public ID.- Specified by:
getFromPublicId
in interfaceClientSet
- Parameters:
publicId
- client public ID- Returns:
- client with id
publicId
if registered, or null
-
getClients
public HubClient[] getClients()
Description copied from interface:ClientSet
Returns an array of all the currently contained clients.- Specified by:
getClients
in interfaceClientSet
- Returns:
- client list
-
containsClient
public boolean containsClient(HubClient client)
Description copied from interface:ClientSet
Indicates whether a given client is currently a member of this set.- Specified by:
containsClient
in interfaceClientSet
- Returns:
- true iff
client
is currently a member of this set
-
-