Package org.astrogrid.samp.hub
Class BasicClientSet
java.lang.Object
org.astrogrid.samp.hub.BasicClientSet
- All Implemented Interfaces:
ClientSet
Basic ClientSet implementation.
- Since:
- 20 Nov 2008
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new client to the set.boolean
containsClient
(HubClient client) Indicates whether a given client is currently a member of this set.Returns an array of all the currently contained clients.getFromPublicId
(String publicId) Returns the client in the set corresponding to a given public ID.void
Removes a client from the set.
-
Constructor Details
-
BasicClientSet
Constructor.- Parameters:
clientIdComparator
- comparator for client IDs
-
-
Method Details
-
add
Description copied from interface:ClientSet
Adds a new client to the set. -
remove
Description copied from interface:ClientSet
Removes a client from the set. -
getFromPublicId
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
Description copied from interface:ClientSet
Returns an array of all the currently contained clients.- Specified by:
getClients
in interfaceClientSet
- Returns:
- client list
-
containsClient
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
-