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 voidadd(HubClient client)Adds a new client to the set.booleancontainsClient(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.HubClientgetFromPublicId(java.lang.String publicId)Returns the client in the set corresponding to a given public ID.voidremove(HubClient client)Removes a client from the set.
-
-
-
Method Detail
-
add
public void add(HubClient client)
Description copied from interface:ClientSetAdds a new client to the set.
-
remove
public void remove(HubClient client)
Description copied from interface:ClientSetRemoves a client from the set.
-
getFromPublicId
public HubClient getFromPublicId(java.lang.String publicId)
Description copied from interface:ClientSetReturns the client in the set corresponding to a given public ID.- Specified by:
getFromPublicIdin interfaceClientSet- Parameters:
publicId- client public ID- Returns:
- client with id
publicIdif registered, or null
-
getClients
public HubClient[] getClients()
Description copied from interface:ClientSetReturns an array of all the currently contained clients.- Specified by:
getClientsin interfaceClientSet- Returns:
- client list
-
containsClient
public boolean containsClient(HubClient client)
Description copied from interface:ClientSetIndicates whether a given client is currently a member of this set.- Specified by:
containsClientin interfaceClientSet- Returns:
- true iff
clientis currently a member of this set
-
-