class ClientSet
This class represents a set of clients.
attributes
clients: Client[]
operation specifications
+ ClientSet ()
-- constructor
pre:
post: clients has been created
+ add (client: Client): Boolean
-- Add a new client to the set.
pre: client is valid
post: if client is successfully added to clientSet
true is returned
else
false is returned
+ delete (name: String): Boolean
-- Delete the client with matching name from the set.
pre: none
post: if client with matching name was successfully deleted
true is returned
else
false is returned
+ find(name: String): Client
-- return a reference to the client if a client exists with matching name.
pre: none
post: if a client exists with matching name
the client object is returned
else
null is returned
+ getClients(): Client[]
post: clients has been returned
This class represents a set of clients.
attributes
clients: Client[]
operation specifications
+ ClientSet ()
-- constructor
pre:
post: clients has been created
+ add (client: Client): Boolean
-- Add a new client to the set.
pre: client is valid
post: if client is successfully added to clientSet
true is returned
else
false is returned
+ delete (name: String): Boolean
-- Delete the client with matching name from the set.
pre: none
post: if client with matching name was successfully deleted
true is returned
else
false is returned
+ find(name: String): Client
-- return a reference to the client if a client exists with matching name.
pre: none
post: if a client exists with matching name
the client object is returned
else
null is returned
+ getClients(): Client[]
post: clients has been returned