Package it.unimi.di.prog2.s12
Class StringToIntMapClient
java.lang.Object
it.unimi.di.prog2.s12.StringToIntMapClient
A class to exercise some methods of
StringToIntMap
.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StringToIntMapClient
private StringToIntMapClient().
-
-
Method Details
-
main
A simple client to test theStringToIntMap
class.The client reads lines from the standard input, where each line is a command followed by some arguments. The commands are:
+ key value
to add or replace a key-value pair to the map;- key
to remove the key from the map;? key
to get the value associated to the key;c
to clear the map;#
to get the size of the map.
The client emits in the standard output the value returned by performing the action requested by the commands.
- Parameters:
args
- not used.
-